3

刚刚安装了一个全新的 Rails 4.0.0 应用程序,我收到了这个错误(https://gist.github.com/hartator/6404820http://0.0.0.0:3000

no implicit conversion of nil into String

activerecord (4.0.0) lib/active_record/connection_adapters/sqlite3_adapter.rb:24:in `initialize'
activerecord (4.0.0) lib/active_record/connection_adapters/sqlite3_adapter.rb:24:in `new'
activerecord (4.0.0) lib/active_record/connection_adapters/sqlite3_adapter.rb:24:in `sqlite3_connection'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in `new_connection'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:450:in `checkout_new_connection'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in `acquire_connection'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:356:in `block in checkout'
/Users/asa/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in `checkout'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'
/Users/asa/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:546:in `retrieve_connection'
activerecord (4.0.0) lib/active_record/connection_handling.rb:79:in `retrieve_connection'
activerecord (4.0.0) lib/active_record/connection_handling.rb:53:in `connection'

我的 database.yml: http: //pastebin.com/JM5TNmNU

我还没有对 vanilla rails 代码做任何事情。知道可能是什么问题吗?

使用:

  • 导轨 4.0.0
  • 红宝石 2.0.0p195
  • 山狮 10.8.2
4

1 回答 1

9

这听起来像是你的 sqlite3 gem 安装的问题。尝试:

gem pristine sqlite3

从 RubyGems 文档:

宝石原始

从 gem 缓存中的文件恢复已安装的 gem 到原始状态

用法
gem pristine [GEMNAME ...] [options]

http://guides.rubygems.org/command-reference/#gem_pristine

于 2013-09-01T18:42:21.470 回答