0

我正在使用 Dreamhost 共享服务器。我收到此错误消息,我不明白这些错误的含义。这是否表明乘客使用 Dreamhost 默认 ruby​​ 1.8 而不是我的本地 1.9.3?这些错误消息显示 passsanger 正在使用 usr/lib/ 而不是我的主文件夹。提前致谢。

In config/environmnet.rb:
# Load the rails application
require File.expand_path('../application', __FILE__)

# Initialize the rails application
RailsMichaelcunnaneCom::Application.initialize!

.

0   /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb  10  in `exit'
1   /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb  10  
2   /usr/lib/ruby/1.8/rubygems/custom_require.rb    36  in `gem_original_require'
3   /usr/lib/ruby/1.8/rubygems/custom_require.rb    36  in `require'
4   /home/miccun2/rails.michaelcunnane.com/config/boot.rb   6   
5   /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `gem_original_require'
6   /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `require'
7   /home/miccun2/rails.michaelcunnane.com/config/application.rb    1   
8   /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `gem_original_require'
9   /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `require'
10  /home/miccun2/rails.michaelcunnane.com/config/environment.rb    2   
11  /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `gem_original_require'
12  /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `require'
13  config.ru   3   
14  /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb  46  in `instance_eval'
15  /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb  46  in `initialize'
16  config.ru   1   in `new'
17  config.ru   1 

红宝石版本:

miccun2@oslo:~/rails.michaelcunnane.com$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
miccun2@oslo:~/rails.michaelcunnane.com$ which ruby
/home/miccun2/.rvm/rubies/ruby-1.9.3-p194/bin/ruby

Rails 版本和启动并运行

miccun2@oslo:~/rails.michaelcunnane.com$ rails -v
Rails 3.2.3
miccun2@oslo:~/rails.michaelcunnane.com$ which rails
/home/miccun2/.rvm/gems/ruby-1.9.3-p194/bin/rails
miccun2@oslo:~/rails.michaelcunnane.com$ rails console
Loading development environment (Rails 3.2.3)
1.9.3p194 :001 > exit

RVM 版本和 gemset 选择

miccun2@oslo:~/rails.michaelcunnane.com$ rvm gemset list
gemsets for ruby-1.9.3-p194 (found in /home/miccun2/.rvm/gems/ruby-1.9.3-p194)
   global
   rails_michaelcunnane_com

miccun2@oslo:~/rails.michaelcunnane.com$ rvm gemset use rails_michaelcunnane_com --default
Using ruby-1.9.3-p194 with gemset rails_michaelcunnane_com

Bundle安装后的Bundle Show

miccun2@oslo:~/rails.michaelcunnane.com$ bundle show
Gems included by the bundle:
  * actionmailer (3.2.3)
  * actionpack (3.2.3)
  * activemodel (3.2.3)
  * activerecord (3.2.3)
  * activeresource (3.2.3)
  * activesupport (3.2.3)
  * arel (3.0.2)
  * builder (3.0.0)
  * bundler (1.1.3)
  * coffee-rails (3.2.2)
  * coffee-script (2.2.0)
  * coffee-script-source (1.3.1)
  * erubis (2.7.0)
  * execjs (1.3.2)
  * hike (1.2.1)
  * i18n (0.6.0)
  * journey (1.0.3)
  * jquery-rails (2.0.2)
  * json (1.7.1)
  * mail (2.4.4)
  * mime-types (1.18)
  * multi_json (1.3.4)
  * polyglot (0.3.3)
  * rack (1.4.1)
  * rack-cache (1.2)
  * rack-ssl (1.3.2)
  * rack-test (0.6.1)
  * rails (3.2.3)
  * railties (3.2.3)
  * rake (0.9.2.2)
  * rdoc (3.12)
  * sass (3.1.17)
  * sass-rails (3.2.5)
  * sprockets (2.1.3)
  * sqlite3 (1.3.6)
  * thor (0.14.6)
  * tilt (1.3.3)
  * treetop (1.4.10)
  * tzinfo (0.3.33)
  * uglifier (1.2.4)
miccun2@oslo:~/rails.michaelcunnane.com$

.

4

1 回答 1

0

上次我部署了一个 Rails 3 应用程序 Dreamhost 没有提供 1.9.2。所以我的应用程序使用了默认的 1.8.7。我认为他们仍然不提供 1.9.2。

我没有使用 RVM,一开始我就想要它,但我认为这太麻烦了。Dreamhost Wiki 有信息,但不受支持。因此,如果出现问题,Dreamhost 不会提供帮助。使用您自己的 1.9.2 时也没有帮助。

在我的笔记本电脑上,我当然使用 RVM,但在 Dreamhost PS 上只使用 Dreamhost Ruby 1.8.7。为了让我的Passenger Rails 3应用程序正常工作,我唯一需要更改的是主目录中的.gemrc,它只有

gemhome: /home/myuser/.gems/
gempath:
- /home/myuser/.gems/
于 2012-05-13T09:51:46.027 回答