我正在尝试使用Apache和Passenger在OSX上部署Rails 3应用程序。
应用程序在命令行
中使用Passenger运行良好(在使用SQLLite的生产模式下)passenger start
但从Apache加载后,如下所示的日志失败。 我已经尝试了宝石原始 - 所有。
如果我将index.html放在rails公共文件夹中,则会正确显示。 任何帮助将不胜感激
Started GET "/" for ::1 at 2014-07-08 18:15:19 +1000
TypeError (no implicit conversion of nil into String):
activerecord (3.2.5) lib/active_record/connection_adapters/sqlite3_adapter.rb:26:in `initialize'
activerecord (3.2.5) lib/active_record/connection_adapters/sqlite3_adapter.rb:26:in `new'
activerecord (3.2.5) lib/active_record/connection_adapters/sqlite3_adapter.rb:26:in `sqlite3_connection'
activerecord (3.2.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:309:in `new_connection'
activerecord (3.2.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:319:in `checkout_new_connection'
activerecord (3.2.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:241:in `block (2 levels) in checkout'
activerecord (3.2.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:236:in `loop'
activerecord (3.2.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:236:in `block in checkout'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
...
https.conf包含
<VirtualHost *:80>
ServerName xxx.com.au
ServerAlias www.xxx.com.au
DocumentRoot /Users/xxx/Projects/wardround/public
RailsEnv production
RackEnv production
<Directory /Users/cathy/Projects/wardround/public>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
答案 0 :(得分:0)
我的问题是对ruby版本和相关宝石的管理不一致。
一切顺利 1.使用rvm安装和使用新的ruby版本
&#39;捆绑安装&#39;正确安装宝石。
按照https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#PassengerRuby