开发者

Getting Rails and mod_passenger to work under Debian with packages

I am running a Debian squeeze server with these (backported) packages installed:

rails          2.3.5-1~bpo50+1
rails-ruby1.8  2.3.5-1~bpo50+1
rake           0.8.7-1~bpo50+1
libapache2-mod-passenger  2.2.11debian-1~bpo50+1

I have a Rails application I am trying to run in this environment, but when I load the page I get t开发者_Go百科his error message:

Actual load error: Could not find RubyGem rails (= 2.3.5) Missing the Rails 2.3.5 gem. Please gem install -v=2.3.5 rails, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

There is a constraint that I must use these "official" Rails and mod_passenger Debian packages, so installing Rails and mod_passenger the traditional way via gems is not a possibility.


There is no real reason that you should have to use offical gems from debian. You get faster security updates by using rubygems or going for fullblown rvm.

However I would suggest commenting out the RAILS_GEM_VERSION in config/environment.rb and then it should use the version you have installed.


This seems to work:

ln -s /usr/share/rails-ruby1.8/ /usr/share/myrailsproject/vendor/rails
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜