Tag: rubygems

Rubygems更新在奇怪的ruby版本上失败

我正在研究一个gem( atd ),我只是试图让gitlab CI运行我所有版本的ruby我的gem支持(2.2.2 – 2.4.0),包括bugfix版本的testing。 我有一个问题(GitLab CI的Pipline链接,看到版本> 2.3.0)与彩虹gem不工作的版本比2.6.9(目前rubygems版本是2.6.10)rubygems,所以在我的gitlab cibuild立(基本上docker集装箱)我试图运行bundle install之前的gem update –system ,并摆脱了彩虹错误,但我得到了以下错误时运行的gem update –system只在ruby版本2.2.4和2.3.0,这很奇怪,因为这两个版本之间有2个版本,2.2.5和2.2.6: 来源: 我的GitLab CIpipe道 Running with gitlab-ci-multi-runner 1.10.4 (b32125f) Using Docker executor with image ruby:2.2.4 … Pulling docker image ruby:2.2.4 … Running on runner-fa6cab46-project-1684988-concurrent-0 via runner-fa6cab46-machine-1486422765-ae1c6a3c-gce… Cloning repository… Cloning into '/builds/izwick-schachter/atd'… Checking out ebe7405a as development… Skipping Git submodules setup […]

在Docker构build中运行gem install会挂起

我有一个非常简单的Dockerfile与以下内容: FROM alpine:3.2 # Install basic packages and Ruby RUN apk update && \ apk upgrade && \ apk add curl wget bash tar ca-certificates && \ apk add ruby ruby-bundler ruby-rdoc ruby-irb # Install Riemann-dash RUN gem install riemann-dash EXPOSE 4567/tcp ENTRYPOINT ["sh", "-ex", "riemann-dash"] 当试图构build它,它挂在命令gem install riemann-dash 。 如果我从另一个terminal( docker exec -it ID […]

Rails&docker – 不能安装json gem

我试图在panamax-ui上使用panamax-ui (一个RoR应用程序)。 我工作了几天(本地和docker),修改成功等 然后我添加了一些新的function和一些gem。 我bundle install一切。 然后,我想重新build立我的docker( docker build ) 但我已经去了这个错误: Gem :: Ext :: BuildError:错误:无法构buildgem原生扩展。 / usr / bin / ruby​​ extconf.rb创buildMakefile 使“DESTDIR =”干净sh:make:找不到 使“DESTDIR =”sh:make:找不到 使失败,退出代码127 Gem文件将保持安装在/usr/lib/ruby/gems/2.1.0/gems/json-1.8.3中进行检查。 logging到/usr/lib/ruby/gems/2.1.0/extensions/x86_64-linux/2.1.0/json-1.8.3/gem_make.out的结果安装json(1.8.3)时发生错误,Bundler无法继续。 确保gem install json -v '1.8.3'在捆绑之前gem install json -v '1.8.3' 。 命令'/ bin / sh -c bundle install –without development test'返回一个非零的代码:5 我试图删除Gemfile.lock并重新运行bundle install然后重builddocker,同样的错误… 这是我的Gemfile : source […]

在运行Docker时,git源码还没有被检出

当我尝试从GitHub使用Gem时,我正面临着一个错误。 我在Gemfile中有以下内容: # Gemfile source 'https://rubygems.org' ruby '2.3.1' gem 'sinatra' gem 'rack' gem 'puma' group :development do gem 'byebug' gem 'rack-test' gem 'rerun', github: 'alexch/rerun', branch: 'master' end 当我从Dockerfile运行bundle install ,它会使用如下消息: … Installing sinatra 1.4.6 Installing listen 3.1.5 (was 3.0.6) Using rerun 0.11.0 from git://github.com/alexch/rerun.git (at master@3e4c486) Bundle complete! 6 Gemfile dependencies, 14 gems now […]

在Heroku上使用Docker时缺lessGemfile

我正在尝试Heroku的docker插件,只是在本地开始。 当我运行docker-compose up web ,出现以下错误: Building web Step 1 : FROM heroku/ruby # Executing 7 build triggers… Step 1 : COPY Gemfile Gemfile.lock /app/user/ ERROR: Service 'web' failed to build: lstat Gemfile: no such file or directory 这是我docker-compose.yml : web: build: . command: 'bash -c ''bundle exec puma -C config/puma.rb''' working_dir: /app/user environment: PORT: 8080 […]

通过Jenkins在docker集装箱Awestruct

我想在Docker容器中使用awestruct来构build我的网站。 一切似乎工作,但最终我收到Jenkins工作的消息: jenkins工作错误 当我直接在服务器上运行Docker容器(不通过Jenkins作业): docker run -i -t –rm –volume /home/jenkins/workspace/myWebsite :/home/jenkins/myWebsite:Z –name myWebsite_Container mbiarnes/myWebsite:latest /bin/bash 我可以直接访问容器。 我可以做一个rake setup ( 耙设置输出 )。 但是,当做一个rake clean build我得到一个错误 我尝试了几乎所有的东西,但是我不能前进。 这是我的Dockerfile 。 当awestruct –version我得到bash: awestruct: command not found 像awestruct没有安装,但在耙设置输出,你可以看到awestruct 0.5.7被使用。 另外在docker镜像的构build期间,我没有收到任何错误,我可以在日志中看到awestruct安装成功。

如何解决错误“捆绑器无法find适用于gemX的兼容版本”

我正在尝试为我的项目设置docker。 我曾尝试安装actionpack 5.0.2,但它并没有对我有任何好处。 我正在关注如何设置教程,所以我认为有版本问题。 当我运行docker-compose时,这是我得到的: Bundler could not find compatible versions for gem "actionpack": In Gemfile: rails (~> 5.0.2) ruby depends on actionpack (= 5.0.2) ruby actionpack (>= 5.1.1, ~> 5.1) ruby 这是我的Gemfile: source 'https://rubygems.org' git_source(:github) do |repo_name| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") "https://github.com/#{repo_name}.git" end gem 'devise' gem 'bootstrap-sass', '~> 3.3.6' gem 'sass-rails', '>= 3.2' […]

Docker&Rails | bundler:找不到命令:rails

我是Docker的新手,对于Rails来说是相当新的。 当我运行docker-compose up ,我得到这个错误: web_1 | bundler: command not found: rails web_1 | Install missing gem executables with `bundle install` app_web_1 exited with code 127 最初我在运行bundle install时遇到了麻烦,无法find任何gem。 我在Gemfile中得到了“ 找不到任何来源的gem ”的错误。 然后我试图运行bundle (没有install ),它没有返回任何错误。 Rails是绝对安装的,因为inputrails给我所有的使用选项。 此外,我可以看到vendor/cache的gem。 我尝试删除所有这些,并运行bundle install ,他们都开始出现一个一个,因为捆绑商安装它们。 编辑:请随时纠正我的理解:因为运行捆绑软件安装意味着在Docker实例上安装gem,它不是“本地”安装。 在尝试解决此问题时,我在本地删除了所有gem,并重新安装了捆绑软件。 所以,当我运行gems list ,我只看到捆绑器。 我跑了bundler install ,它声称所有的gem正在安装​​。 他们在哪里安装? 它说,这将是供应商/caching,这是真的。 我可以在那里看到它们,但它仍然没有find任何gem:它甚至不会find轨道。 编辑2:我还应该提到: bin/rails s启动服务器就好了。 由于数据库实例没有运行,它不会加载任何东西,但这是有道理的,我猜。 编辑3:我在本地运行gem install […]