Gemfile语法错误:尝试捆绑安装时

时间:2021-08-06 17:42:45
source 'https://rubygems.org'

gem 'rails', '4.0.0'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
gem 'bootstrap-sass', '~> 3.0.3.0'

group :development, :test do
  gem 'sqlite3'
end

group :production do
  gem 'pg'
  gem 'rails_12factor'
end

group :doc do
  gem 'sdoc', require: false
end

// When I try to bundle install --without production I get an error message.

//当我尝试捆绑安装 - 没有生产时,我收到一条错误消息。

2 个解决方案

#1


1  

This line looks a bit wrong gem 'bootstrap-sass', '~> 3.0.3.0'

这条线看起来有点不对,宝石'bootstrap-sass','〜> 3.0.3.0'

Usually you would expect the semantic versioning to go to three levels only

通常,您会希望语义版本控制只能达到三个级别

I suspect the problem isn't being picked up when bundling locally.

我怀疑在本地捆绑时问题没有解决。

#2


0  

The bundle install command installs the gems based on the Gemfile.lock file in your project. Try running a bundle update instead - this may resolve any version conflicts you may be having in your Gemfile (depending on if you've made any updates).

bundle install命令根据项目中的Gemfile.lock文件安装gem。尝试运行捆绑更新 - 这可以解决您在Gemfile中可能遇到的任何版本冲突(取决于您是否进行了任何更新)。

#1


1  

This line looks a bit wrong gem 'bootstrap-sass', '~> 3.0.3.0'

这条线看起来有点不对,宝石'bootstrap-sass','〜> 3.0.3.0'

Usually you would expect the semantic versioning to go to three levels only

通常,您会希望语义版本控制只能达到三个级别

I suspect the problem isn't being picked up when bundling locally.

我怀疑在本地捆绑时问题没有解决。

#2


0  

The bundle install command installs the gems based on the Gemfile.lock file in your project. Try running a bundle update instead - this may resolve any version conflicts you may be having in your Gemfile (depending on if you've made any updates).

bundle install命令根据项目中的Gemfile.lock文件安装gem。尝试运行捆绑更新 - 这可以解决您在Gemfile中可能遇到的任何版本冲突(取决于您是否进行了任何更新)。