我正在使用Mac OS Snow Leopard,Apache Server,Phusion Passenger和RVM,我正在尝试在本地计算机上部署RoR应用程序。
在我的~.etc/apache/httpd.conf
文件中,我有:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName mysite.com
DocumentRoot /Users/MyUserName/Sites/mysite.com/public
<Directory /Users/MyUserName/Sites/mysite.com/public>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
当我浏览mysite.com
地址时,我收到以下Phusion Passenger错误:
Error message:
no such file to load -- bundler
Exception class:
LoadError
Application root:
/Users/MyUserName/Sites/mysite.com
Backtrace:
# File Line Location
0 /Users/MyUserName/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb 36 in `require'
1 /Users/MyUserName/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb 36 in `require'
...
我该如何解决?
控制台输出:
$ /usr/bin/ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin10.0]
$ echo $PATH
/Users/MyUserName/.rvm/gems/ruby-1.9.2-p290/bin:/Users/MyUserName/.rvm/gems/ruby-1.9.2-p290@global/bin:/Users/MyUserName/.rvm/rubies/ruby-1.9.2-p290/bin:/Users/MyUserName/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin
$ which ruby gem irb rake
/Users/MyUserName/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
/Users/MyUserName/.rvm/rubies/ruby-1.9.2-p290/bin/gem
/Users/MyUserName/.rvm/rubies/ruby-1.9.2-p290/bin/irb
/Users/MyUserName/.rvm/gems/ruby-1.9.2-p290/bin/rake
$ irb
1.9.2-p290 :001 > require "bundler"
=> true