I am using rvm doing the following:
rvm install ree <--- (Ruby Enterprise Edition), or this can be 1.8.7 or 1.9.2 rvm ree rvm gemset create 'proj' cd path/to/proj bundle install
therefore, the gemfile in this project says:
gem 'rails', '3.0.0'
and bundle installvery fast reporting
bundle install
Using rails (3.0.0)
but after that when i type
$ rails -v /Library/Ruby/Site/1.8/rubygems.rb:779:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError) from /Library/Ruby/Site/1.8/rubygems.rb:214:in `activate' from /Library/Ruby/Site/1.8/rubygems.rb:1082:in `gem' from /usr/bin/rails:18 $ which rails /usr/bin/rails
why bundle installdoesn't it set rails as a gem? but if I type script/rails -v, it shows that it is 3.0.0
script/rails -v
It is right. bundle installwill not install Rails as a gem in the usual sense. Now explain why.
Bundler , : ~/.bundle/<type-of-ruby>/<version>/gems. . , , . bad , . SomeGem v2, SomeGem v1? .
~/.bundle/<type-of-ruby>/<version>/gems
Bundler , ( Gemfile. rails, ( , gem install rails), Bundler ( bundle install Rails).
Gemfile
rails
gem install rails
, Bundler, bundle exec rails , Gemfile, Rails. Bundler Rails, , bundle exec .
bundle exec rails
bundle exec
be , , . -,
be
( , rvm info, do rvm ree@proj, gemset: 'proj'), . Btw, .
rvm info
rvm ree@proj
, -, ,
, , ( "" gem ), gem install bundler, , gem , rvm.
: .bundle, ( gem uninstall bundler?). , rvm ree @proj gem install bundler .
Yehuda , bundler, (bundler 1.0.0). , , .