FreeBSD 9.2 Apache 2.4 + Passenger 试图启动Redmine 2.3.2
错误:
/usr/local/lib/ruby/gems/1.9/gems/activerecord-3.2.13/lib/active_record
/connection_adapters/abstract/connection_specification.rb:47:in
`resolve_hash_connection': database configuration does not specify
adapter (ActiveRecord::AdapterNotSpecified)
我发现如果我将适配器从adapter: mysql2
更改为adapter:mysql2
(删除“:”之后的空格),则此错误消失了,但是我还有另一个错误:
/usr/local/lib/ruby/gems/1.9/gems/bundler-1.3.5/lib/bundler/dsl.rb:33:in
`rescue in eval_gemfile': Gemfile syntax error:
(Bundler::GemfileError)
所以我必须在配置adapter: mysql2
时使其工作,所以我必须以其他方式解决ActiveRecord :: AdapterNotSpecified错误问题,而不是通过删除那里的空间。
有什么想法吗?
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.25
- RUBY VERSION: 1.9.3 (2013-06-27 patchlevel 448) [amd64-freebsd9]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9
- RUBY EXECUTABLE: /usr/local/bin/ruby19
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- amd64-freebsd-9
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.9
- /root/.gem/ruby/1.9
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
答案 0 :(得分:0)
在我看来,您没有将变量RAILS_ENV设置为生产。
尝试写入起始脚本RAILS_ENV=production
或全局设置变量