2012-04-22 11 views
1

私は、RailsウェブサイトのRails3チュートリアル第2版に従っています。しかし、レールサーバーを使用するのではなく、OS X Lionで私のApache設定を使用したいと思っています。このように、私は乗客と乗客の選好の枠をインストールしました。私は何の問題もなくウェルカムページに得ることができますが、私は自分のアプリケーション環境を表示するには、リンクをクリックした場合、私は、次のエラーメッセージが表示されます。旅客が宝石を探す場所

Ruby (Rack) application could not be started 
These are the possible causes: 
There may be a syntax error in the application's code. Please check for such errors and fix them. 
A required library may not installed. Please install all libraries that this application requires. 
The application may not be properly configured. Please check whether all configuration files are written correctly, fix any incorrect configurations, and restart this application. 
A service that the application relies on (such as the database server or the Ferret search engine server) may not have been started. Please start that service. 
Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem. 
Error message: 
Could not find coffee-script-source-1.3.1 in any of the sources (Bundler::GemNotFound) 
Exception class: 
PhusionPassenger::UnknownError 
Application root: 
/Users/ash/NetBeansProjects/ruby/first_app 
Backtrace: 
# File Line Location 
0 /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/spec_set.rb 90 in `materialize' 
1 /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/spec_set.rb 83 in `map!' 
2 /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/spec_set.rb 83 in `materialize' 
3 /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/definition.rb 127 in `specs' 
4 /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/definition.rb 172 in `specs_for' 
5 /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/definition.rb 161 in `requested_specs' 
6 /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/environment.rb 23 in `requested_specs' 
7 /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb 11 in `setup' 
8 /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler.rb 107 in `setup' 
9 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/utils.rb 326 in `prepare_app_process' 
10 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb 156 in `initialize_server' 
11 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/utils.rb 572 in `report_app_init_status' 
12 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb 154 in `initialize_server' 
13 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb 204 in `start_synchronously' 
14 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb 180 in `start' 
15 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb 129 in `start' 
16 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb 253 in `spawn_rack_application' 
17 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server_collection.rb 132 in `lookup_or_add' 
18 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb 246 in `spawn_rack_application' 
19 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server_collection.rb 82 in `synchronize' 
20 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server_collection.rb 79 in `synchronize' 
21 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb 244 in `spawn_rack_application' 
22 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb 137 in `spawn_application' 
23 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb 275 in `handle_spawn_application' 
24 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb 357 in `__send__' 
25 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb 357 in `server_main_loop' 
26 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb 206 in `start_synchronously' 
27 /Library/Ruby/Gems/1.8/gems/passenger-3.0.12/helper-scripts/passenger-spawn-server 99 

私は/Library/Ruby/Gems/1.8/に見て、サブディレクトリのいずれかの場合、私はへの参照を見つけていませんコーヒースクリプト。しかし、迅速なash$ bundle show coffee-script-sourceは総Rubyの初心者として宝石ファイルが/Users/ash/.rvm/gems/[email protected]/gems/coffee-script-source-1.3.1

である(NB私はレールのサーバーを使用している場合、私はこの問題を持っていないが、それは私が欲しいの解像度ではありません)

を私に示して正しいファイルを見つけるためにPassengerセットアップをどのように設定する必要がありますか?

答えて

4

おそらく、あなたのシステムの宝石ではなく、あなたのrvmの宝石だけがPhusionによって分かっています。あなたはそれを見せるために環境変数GEM_HOMEを設定する必要があります。

もしあなたがApacheを使用しているのであれば、Phusionを起動するのに.htaccessファイルがあると思われます。 PassengerEnabledラインの前に、そこでは、

SetEnv GEM_HOME '/Users/ash/.rvm/gems/[email protected]/gems' 

に私は、Apacheなしで動作するはずと信じて、他の方法を、追加、(それが存在しない場合)、アプリケーションのconfigディレクトリにsetup_load_paths.rbというファイルを作成することですこの行を追加します。私はまた、旅客から「Webアプリケーションが起動できませんでした」のエラーを得ていた

ENV['GEM_HOME']='/Users/ash/.rvm/gems/[email protected]/gems 
+0

を:私の場合、それは 'そのようなファイルをロードすることはできませんでした - 'ビルダー(とLoadErrorが)。私はそれが宝石を探しているのか分かりませんが、私のApache仮想ホストファイルにKevinの行を追加することで問題は解決しました。 – sffc

関連する問題