gemfile

What is the difference between Gemfile and Gemfile.lock in Ruby on Rails

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 15:02:28
问题 I am a beginner to Ruby on Rails and I am using Rails 3.0.9. What is the difference between Gemfile and Gemfile.lock in Rails? 回答1: The Gemfile is where you specify which gems you want to use, and lets you specify which versions. The Gemfile.lock file is where Bundler records the exact versions that were installed. This way, when the same library/project is loaded on another machine, running bundle install will look at the Gemfile.lock and install the exact same versions, rather than just

Your Ruby version is 2.0.0, but your Gemfile specified 2.1.0

萝らか妹 提交于 2019-11-26 12:26:40
When I try to bundle install I get the following message: Your Ruby version is 2.0.0, but your Gemfile specified 2.1.0 In my Gemfile I have the following: ruby '2.1.0' And when I run ruby -v in the console I get: ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin12.0] What does Ruby 2.1.0p0 mean? What version should I have in my Gemfile and why does the error tell me I have Ruby version 2.0.0? Зелёный Run gem install bundler or gem update bundler which may fix your problem. For all new installed versions of Ruby you should update or install a new bundler. In the top-level directory of

What does 'require: false' in Gemfile mean?

淺唱寂寞╮ 提交于 2019-11-26 03:47:00
问题 Does this: gem \'whenever\', require: false mean that the gem needs to be installed, or does it mean it is not required? 回答1: This means install the gem, but do not call require when you start Bundler. So you will need to manually call require "whenever" if you want to use the library. If you were to do gem "whenever", require: "whereever" then bundler would download the gem named whenever, but would call require "whereever" This is often used if the name of library to require is different

Your Ruby version is 2.0.0, but your Gemfile specified 2.1.0

梦想的初衷 提交于 2019-11-26 02:57:38
问题 When I try to bundle install I get the following message: Your Ruby version is 2.0.0, but your Gemfile specified 2.1.0 In my Gemfile I have the following: ruby \'2.1.0\' And when I run ruby -v in the console I get: ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin12.0] What does Ruby 2.1.0p0 mean? What version should I have in my Gemfile and why does the error tell me I have Ruby version 2.0.0? 回答1: Run gem install bundler or gem update bundler which may fix your problem. For all new