没有这样的文件加载

没有这样的文件加载

本文介绍了RVM和乘客:没有这样的文件加载 - 捆绑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我见过其他类似的错误,但没有一个解决方案适用于我:

I've seen other similar errors, but none of the solutions have worked for me:

在Snow Leopard上,我将RVM与基于项目的gemsets 。我有Rails 2和Rails 3应用程序。当我使用Rails 2或Rails 3的捆绑器时,我得到:

On Snow Leopard, I'm using RVM with project-based gemsets. I have both Rails 2 and Rails 3 apps. When I use bundler with Rails 2 or with Rails 3, I get:

no such file to load -- bundler

在我不使用捆绑器的Rails 2应用程序中,我只是收到一条消息,指出在需要安装Rails时它是。

In my Rails 2 apps that don't use bundler, I just get a message that Rails needs to be installed when it is.

我的RVM安装包含一个带有REE版本Ruby的全局gemset。

My RVM install has a global gemset with REE version of Ruby.

$ rvm list

rvm rubies

=> ree-1.8.7-2011.03 [ x86_64 ]
   ruby-1.8.7-p174 [ x86_64 ]
   ruby-1.9.2-head [ x86_64 ]

$ rvm gemset list

gemsets for ree-1.8.7-2011.03 (found in /Users/dwayne/.rvm/gems/ree-1.8.7-2011.03)
   cm
   duke
=> global

我的全球宝石:

My global gems:

$ gem list

*** LOCAL GEMS ***

bundler (1.0.14)
daemon_controller (0.2.6)
fastthread (1.0.7)
passenger (3.0.7)
rack (1.3.0)
rake (0.9.0)
rdoc (3.6.1)

Apache配置中的乘客线路:

Passenger lines in Apache config:

LoadModule passenger_module /Users/dwayne/.rvm/gems/ree-1.8.7-2011.03@global/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
PassengerRoot /Users/dwayne/.rvm/gems/ree-1.8.7-2011.03@global/gems/passenger-3.0.7
PassengerRuby /Users/dwayne/.rvm/wrappers/ree-1.8.7-2011.03@global/ruby

duke项目的RubyGems环境:

RubyGems environment for "duke" project:

- RUBYGEMS VERSION: 1.6.2
- RUBY VERSION: 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.7.0]
- INSTALLATION DIRECTORY: /Users/dwayne/.rvm/gems/ree-1.8.7-2011.03@duke
- RUBY EXECUTABLE: /Users/dwayne/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby
- EXECUTABLE DIRECTORY: /Users/dwayne/.rvm/gems/ree-1.8.7-2011.03@duke/bin
- RUBYGEMS PLATFORMS:
  - ruby
  - x86-darwin-10
- GEM PATHS:
   - /Users/dwayne/.rvm/gems/ree-1.8.7-2011.03@duke
   - /Users/dwayne/.rvm/gems/ree-1.8.7-2011.03@global
- GEM CONFIGURATION:
   - :update_sources => true
   - :verbose => true
   - :benchmark => false
   - :backtrace => false
   - :bulk_threshold => 1000
   - "gem" => "--no-ri --no-rdoc"
   - :sources => ["http://rubygems.org/", "http://gemcutter.org/"]
- REMOTE SOURCES:
   - http://rubygems.org/
   - http://gemcutter.org/

.rvmrc for duke:

.rvmrc for duke:

rvm --create use  "ree@duke"

'gem list'in duke directory:

'gem list' within duke directory:

$ gem list

*** LOCAL GEMS ***

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
arel (2.0.10)
authlogic (2.1.3)
builder (2.1.2)
bundler (1.0.14)
daemon_controller (0.2.6)
fastthread (1.0.7)
i18n (0.5.0)
mysql (2.8.1)
passenger (3.0.7)
pdfkit (0.5.0)
rack (1.3.0, 1.0.1)
rails (2.3.5)
rake (0.9.0)
rdoc (3.6.1)
tzinfo (0.3.27)

最后几行回溯:

0   /Users/dwayne/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb   36  in `gem_original_require'
1   /Users/dwayne/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb   36  in `require'
2   /Users/dwayne/.rvm/gems/ree-1.8.7-2011.03@global/gems/passenger-3.0.7/lib/phusion_passenger/utils.rb    325 in `prepare_app_process'
3   /Users/dwayne/.rvm/gems/ree-1.8.7-2011.03@global/gems/passenger-3.0.7/lib/phusion_passenger/classic_rails/application_spawner.rb    176 in `initialize_server'
4   /Users/dwayne/.rvm/gems/ree-1.8.7-2011.03@global/gems/passenger-3.0.7/lib/phusion_passenger/utils.rb    572 in `report_app_init_status'
5   /Users/dwayne/.rvm/gems/ree-1.8.7-2011.03@global/gems/passenger-3.0.7/lib/phusion_passenger/classic_rails/application_spawner.rb

我的Rails 3项目也是这样。

The same is true of my Rails 3 projects.

任何人都可以帮忙吗?它确实看起来像一个路径问题,但我不明白的问题。

Can anyone help with this? It sure seems like a path issue, but I can't figure out the problem.

谢谢。

推荐答案

啊,最后一个地方看,我发现了问题。原来,我仍然有Passenger的一些旧虚拟主机设置(使用PassengerPreferencePane),对于某些应用程序,我还需要添加RVM / Passenger安装文档中提到的setup_load_paths.rb。

Ah, one last place to look, and I found the problem. Turns out I still had some old virtual host settings for Passenger (using PassengerPreferencePane), and for some apps, I also needed to add the setup_load_paths.rb mentioned in the RVM/Passenger installation documentation.

这篇关于RVM和乘客:没有这样的文件加载 - 捆绑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 15:13