简体   繁体   中英

Missing the Rails 2.3.11 gem. Please `gem install -v=2.3.11 rails`,

I am having a problem with my rails install on ubuntu 11.04 and not sure what the problem is ...i just installed rails and passenger and rvm on production and all seems ok but for some reason i keep getting

Missing the Rails 2.3.11 gem. Please `gem install -v=2.3.11 rails`,

Here is the link

when i am on the application and i do

gem list

*** LOCAL GEMS ***

actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
bundler (1.0.21)
rack (1.1.2)
rails (2.3.11)
rake (0.9.2.2)

so it doesnt make sense what is going on and why its telling me that i dont have rails installed...any ideas on what im doing wrong

Here is my rvm info

rvm list

rvm rubies

gem install -v=2.3.11 rails
Fetching: rake-0.9.2.2.gem (100%)
Fetching: activesupport-2.3.11.gem (100%)
Fetching: activerecord-2.3.11.gem (100%)
Fetching: rack-1.1.2.gem (100%)
Fetching: actionpack-2.3.11.gem (100%)
Fetching: actionmailer-2.3.11.gem (100%)
Fetching: activeresource-2.3.11.gem (100%)
Fetching: rails-2.3.11.gem (100%)
Successfully installed rake-0.9.2.2
Successfully installed activesupport-2.3.11
Successfully installed activerecord-2.3.11
Successfully installed rack-1.1.2
Successfully installed actionpack-2.3.11
Successfully installed actionmailer-2.3.11
Successfully installed activeresource-2.3.11
Successfully installed rails-2.3.11
8 gems installed
Installing ri documentation for rake-0.9.2.2...



=> ruby-1.8.7-p334 [ x86_64 ]
   ruby-1.9.2-p290 [ x86_64 ]


rvm gemset list

gemsets for ruby-1.8.7-p334 (found in /home/ubuntu/.rvm/gems/ruby-1.8.7-p334)
   global
=> ticket_mule

UPDATE environment.rb

RAILS_GEM_VERSION = '2.3.11' unless defined? RAILS_GEM_VERSION


Rails::Initializer.run do |config|


  # Specify gems that this application depends on and have them installed with rake gems:install
  # config.gem "bj"
  # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
  # config.gem "sqlite3-ruby", :lib => "sqlite3"
  # config.gem "aws-s3", :lib => "aws/s3"
  config.gem 'will_paginate'
  config.gem 'authlogic'
  config.gem 'searchlogic'
  config.gem 'paperclip'
  config.gem 'prawn'
  config.gem 'populator'
  config.gem 'faker'

That's rather famous problem linked with rack . Please see this article for possible solution your issue. There is one more article about it, but unfortunately it was written on russian.

It could be that your passenger is not using the RVM environment at all. For that to work out of the box, you need to

  • have your app run under the ubuntu user (which it doesn't do by default, it uses the webserver user www-data by default) and setting proper defaults so that the correct ruby and gemset is used RVM, or to
  • set up full passenger integration for RVM. See http://beginrescueend.com/integration/passenger/ for more info about that.

Note that passenger can only use exactly one ruby at a time. While you can use different gemsets on the same ruby in a single passenger instance (eg fpr multiple applications), you can not switch between rubies.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM