Ruby 2.0으로 Rails 4 애플리케이션을 설정하고 있는데 "웹 애플리케이션을 시작할 수 없습니다"라는 메시지가 표시됩니다.
cannot load such file -- bundler/setup (LoadError)
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.19/lib/phusion_passenger/loader_shared_helpers.rb:212:in `run_load_path_setup_code'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.19/helper-scripts/rack-preloader.rb:96:in `preload_app'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.19/helper-scripts/rack-preloader.rb:150:in `<module:App>'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.19/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.19/helper-scripts/rack-preloader.rb:28:in `<main>'
내 apache2.conf는 다음과 같습니다
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-4.0.19/buildout/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-4.0.19
PassengerDefaultRuby /usr/local/bin/ruby
bundle -v
입니다 :
Bundler version 1.3.5
ruby -v
입니다 :
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
gem env
입니다 :
RubyGems Environment:
- RUBYGEMS VERSION: 2.1.5
- RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/lib/ruby/gems/1.8/bin
- SPEC CACHE DIRECTORY: /root/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /root/.gems/bin
- /usr/lib/ruby/gems/1.8/bin/
- /usr/local/bin
- /usr/bin
- /bin
- /usr/bin/X11
- /usr/games
- /usr/sbin
- /sbin
echo $GEM_PATH
입니다 :
/usr/lib/ruby/gems/1.8:/usr/lib/ruby/gems/1.8
안 GEM_PATH
될 /usr/lib/ruby/gems/2.0
?
apache2.conf의 가상 호스트 내부에 다음을 추가했습니다.
SetEnv GEM_HOME /usr/lib/ruby/gems/1.8
그리고 지금 작동하고 있습니다.
이 문제를 해결하는 올바른 방법입니까?
sudo
실제로 필요한가? 나는 사용sudo
했지만 지금은 내가하지 않았다면 무슨 일이 있었는지 궁금합니다.