2012-05-09 48 views
0

你能幫我解決這個問題嗎?merb無法加載dm-mysql-adapter

gem list顯示dm-mysql-adapter已安裝,但merb無法加載它。 我只是想開始由merb-gen生成一個簡單的merb應用程序。

Loading init file from ./config/init.rb 
Loading ./config/environments/development.rb 
/usr/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:163:in `require': no such file to load -- dm-mysql-adapter (LoadError) 
    from /usr/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:163:in `load_adapter' 
    from /usr/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:133:in `adapter_class' 
    from /usr/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:13:in `new' 
    from /usr/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core.rb:230:in `setup' 
    from /home/pl/merb/merb-f/config/environments/development.rb:18 
    from /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:498:in `load' 
    from /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:498:in `load_env_config' 
    from /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:378:in `run' 
    from /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:97:in `run' 
    from /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/server.rb:172:in `bootup' 
    from /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/server.rb:42:in `start' 
    from /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core.rb:165:in `start' 
    from /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/bin/merb:20 
    from /usr/local/bin/merb:19:in `load' 
    from /usr/local/bin/merb:19 
[email protected]:~/merb/merb-f$ sudo gem list | grep "dm-mysql-adapter" 
dm-mysql-adapter (1.2.0) 

回答

0

確保Merb的知道你的GEM_PATH

0

根本原因:某些數據庫適配器配置錯誤。可能由Merb應用程序生成或手動編輯。

將數據庫適配器從mysql更改爲sqlite,它的工作原理。