我正在尝试在docker文件中安装bundler v2,它安装成功。当我运行rubocop时,我得到下面的错误。
warn_for_outdated_bundler_version': You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError)
似乎仍然认为我使用的是bundler旧版本,我如何修复这个错误?
Dockerfile是
FROM ruby:2.3.4-alpine
WORKDIR "/var/www/app"
COPY Gemfile Gemfile
CO
无法更新生产服务器上的gem。
我试过bundle install --deployment和bundle install --without development test
但是继续得到:
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
If this is a development machine, remove the
我在一个较旧的Rails项目中,该项目有一个Gemfile。我试图将gem添加到Gemfile和bundle install中,但得到了一个错误:
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 3.0.0) ruby depends on
bundler (~> 1.0.0) ruby
Current Bundler version:
bundler (1.1.5)
This Gemfile requires a
我刚开始使用ROR,现在我正在安装Spree,以下步骤如下
gem install rails -v 3.1.4
rails new mystore
cd mystore
spree install
在此之后,这里显示了这个错误
gemfile spree
gemfile spree_usa_epay
gemfile spree_skrill
run bundle install from "."
Could not find gem 'spree_skrill (>= 0) ruby' in the gems
我正在尝试捆绑安装一个运行gem 'rails', '4.2.0'的项目。运行Bundle install时,我得到:
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 4.2.0) was resolved to 4.2.0, which depends on
bundler (>= 1.3.0, < 2.0)
Current Bundler version:
bundler (2
我将应用程序Gemfile中的rails行更改为:
gem 'rails', '4.2.3'
至:
gem 'rails', '5.0.0'
关于升级过程的rails文档。然后我运行bundle update rails。然后我遇到了一个路障:
Bundler could not find compatible versions for gem "railties":
In Gemfile:
dotenv-rails (= 2.0.2) was resolved to 2.0.2, which depends
Gem::LoadError
Specified 'mysql2' for database adapter, but the gem is not loaded.
Add `gem 'mysql2'` to your Gemfile
加载以下文件时发生此错误:
active_record/base
这是我在运行rails服务器时遇到的错误。
The mysql2 gem has been added to the Gemfile as well.
我已经执行了bundle install,并尝试重新启动服务器,但仍然收到错误。
从Rails 4.2.10升级到Rails 5.1.4将导致下面的错误消息。我不知道如何解决依赖关系。红宝石版本为2.5.1。Rails 4.2.10在没有问题的情况下运行,bundle upgrade运行时不返回任何错误。
更新:添加了下面的Gemfile以供参考。在执行Gemfile.lock之前删除bundle update时,仍然会生成以下错误消息。
错误消息
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
rails (~> 5.1.4) wa
我将这个添加到Gemfile中:
gem 'omniauth-facebook'
然后我运行bundle update。到目前为止没有问题。但是当我运行rails server时,我得到了这个错误:
Could not find hashie-1.2.0 in any of the sources
Run `bundle install` to install missing gems.
我认为bundler应该解决并满足所有依赖项,但我还是尝试了一下:
gem install hashie-1.2.0
结果是这样的:
ERROR: Could not find a vali
我运行的是Ruby2.7.0、Bundler 2.1.4和macOS 10.15.3。
我在一个空文件夹中有一个Gemfile,它只指定Ruby版本:
ruby '2.7.0'
当我运行bundle或bundle install时,我得到:
% bundle install
The Gemfile specifies no dependencies
Bundle complete! 0 Gemfile dependencies, 1 gem now installed.
Use `bundle info [gemname]` to see where a bundled gem
当我在Git Bash上运行Jekyll serve时,我得到以下警告:
Please add the following to your Gemfile to avoid polling for changes:
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
添加Gemfile后,我收到另一条错误消息。
Could not find gem 'wdm (>= 0.1.0) x64-mingw32' in any of the gem sources
listed in your Gemfile
我有过
group :production, :staging do
gem "therubyracer"
end
在我的Gemfile里。如果我运行:
bundle install --without production staging test
therubyracer已添加到我的Gemfile.lock中。为什么会这样呢?我希望它会被忽略?
为了完整起见,如果我删除这一行:
gem "therubyracer"
然后运行上面的bundle命令,然后从我的Gemfile.lock中删除这个therubyracer gem
我有一个基本的Rails应用程序在docker中运行。我可以很好地启动它,并提供响应。我可以很好地运行rake -T。但是我不能运行Rails生成命令。它没能告诉我Could not find rake-12.3.1 in any of the sources
$ docker-compose run main bundle exec rails generate controller Welcome index
Starting cognitopoc_db_1 ... done
Could not find rake-12.3.1 in any of the sources
Run `bun
我是Ruby on Rails的新手,现在尝试安装ROR。我遵循这个教程http://blog.sudobits.com/2011/10/27/how-to-install-ruby-on-rails-in-ubuntu-11-10/
安装此gem install rails后,创建我的项目,如rails new myproject。此处显示此消息
Your bundle is complete! Use包显示gemnameto see where a bundled gem is installed.。
然后我运行bundle install,它显示了这个错误Could not locate
平台: windows 7,运行在JRuby 1.6.8上。
C:\project> rake db:migrate
rake aborted!
You have already activated rake 10.0.3, but your Gemfile requires rake 0.9.2.2.
Using bundle exec may solve this.
好的。我已经添加了
gem "rake", "= 0.9.2.2"
转到Gemfile并运行:
C:\project> bundle exec rake db:migrate
bun
我正在尝试在一台新计算机上设置我的开发环境。
git clone -o heroku git@heroku.com:theirapp.git
cd theirapp
bundle
Fetching gem metadata from https://rubygems.org/......
Fetching gem metadata from https://rubygems.org/..
Could not find jquery-rails-2.0.0 in any of the sources
谷歌搜索此错误后,响应似乎是删除Gemfile.lock,然后再次运行bundle。这是可行的,
我有一个小的web应用程序,它使用了一堆宝石。其中一些仅用于test和development环境。现在,当我尝试使用以下命令在生产服务器上启动unicorn时,它失败了。
unicorn_rails -E production -D -c config/unicorn.rb
我在日志文件中看到的错误是:
Refreshing Gem list
Could not find gem 'spork (>= 0.9.0.rc2, runtime)' in any of the gem sources listed in your Gemfile.
Try running `bu
当我试图在一个新项目上运行"rails server“时,它返回
Could not find gem 'mysql2 (>= 0) X86-mingw32' in any of the gem sources listed in your Gemfile.
Run 'bundle install' to install missing gems.
我运行了'bundle install‘,但是我得到了同样的错误。
我已经从xampp包安装了mysql,但是我的朋友帮我安装了rails,所以我不确定他是如何配置的。我使用Windows V
我已经在我的Gemfile中添加了一个gem 'koala‘,当我运行'bundle install’命令时,似乎抛出了gem的版本:
Bundler could not find compatible versions for gem "faraday":
In snapshot (Gemfile.lock):
faraday (0.6.1)
In Gemfile:
koala (~> 1.2.0beta1) depends on
faraday (~> 0.7.4)
Running `bundle update` will rebuild