我试图在我的网络服务器上运行我的Ruby on Rails项目,我从乘客那里收到了这条消息:
Error message:
Could not find rake-0.9.2.2 in any of the sources (Bundler::GemNotFound)
当我在SSH中尝试安装budle时会发生这种情况。
passenger@web2:/var/www/clients/client11/web100/web$ bundle install .bundle
/home/passenger/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/settings.rb:101:in `initialize': Permission denied - /var/www/clients/client11/web100/web/.bundle/config (Errno::EACCES)
from /home/passenger/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/settings.rb:101:in `open'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/settings.rb:101:in `set_key'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/settings.rb:15:in `[]='
from /home/passenger/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/cli.rb:211:in `install'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/vendor/thor/task.rb:22:in `run'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/vendor/thor.rb:263:in `dispatch'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/vendor/thor/base.rb:386:in `start'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/bin/bundle:13:in `<top (required)>'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0@global/bin/bundle:19:in `load'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0@global/bin/bundle:19:in `<main>'
或当我尝试
时passenger@web2:/var/www/clients/client11/web100/web$ bundle install
Fetching source index for https://rubygems.org/
Errno::EACCES: Permission denied - /var/www/clients/client11/web100/web/bundler/ruby/1.9.1/cache
An error occured while installing rake (0.9.2.2), and Bundler cannot continue.
Make sure that `gem install rake -v '0.9.2.2'` succeeds before bundling.
但是web用ruby1.9.3编码 我尝试按照建议手动安装rake
passenger@web2:/var/www/clients/client11/web100/web$ gem install rake -v '0.9.2.2'
Fetching: rake-0.9.2.2.gem (100%)
Successfully installed rake-0.9.2.2
1 gem installed
Installing ri documentation for rake-0.9.2.2...
Installing RDoc documentation for rake-0.9.2.2...
passenger@web2:/var/www/clients/client11/web100/web$ bundle install Fetching source index for https://rubygems.org/
Errno::EACCES: Permission denied - /var/www/clients/client11/web100/web/bundler/ruby/1.9.1/cache
An error occured while installing rake (0.9.2.2), and Bundler cannot continue.
Make sure that `gem install rake -v '0.9.2.2'` succeeds before bundling.
答案 0 :(得分:1)
您的BUNDLE_PATH值似乎有误。
查看这篇文章,可能会对您有所帮助:http://blog.ninjahideout.com/posts/the-path-to-better-rvm-and-passenger-integration