Heroku db:拉错误“LoadError:无法加载此类文件 - sqlite3(Sequel :: AdapterNotFound)”

时间:2013-02-28 22:52:37

标签: heroku

我能够运行heroku db:从我的MacBook开发环境中拔出没有任何问题,但是当我在Windows 7机器上执行命令时出现以下错误

C:/Program Files (x86)/Heroku/ruby-.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': LoadError: cannot load such file -- sqlite3 (Sequel::AdapterNotFound)
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/adapters/sqlite.rb:1:in `<top (required)>'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:249:in `block in tsk_require'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:72:in `block in check_requiring_thread'
    from <internal:prelude>:10:in `synchronize'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:69:in `check_requiring_thread'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:249:in `tsk_require'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:25:in `adapter_class'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:54:in `connect'
    from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:119:in `connect'
    from C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.23/lib/taps/schema.rb:69:in `load_indexes'
    from C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.23/bin/schema:40:in `<main>'

5 个答案:

答案 0 :(得分:5)

您可能需要安装sqlite3 gem。

答案 1 :(得分:1)

我会尝试安装几个宝石:

gem install sqlite3
gem install heroku

答案 2 :(得分:1)

我遇到了同样的问题。我已经添加了sqlite3 gem,但我错误地调用了续集适配器sqlite3。正确的适配器名称只是sqlite

答案 3 :(得分:0)

尝试使用以下命令更新gem:

gem update --system

答案 4 :(得分:0)

尝试将以下内容包含在gemfile中:

#include <set>

bool g(int *t, int n)
{
    std::set<int> s {t, t+n};
    return n > 0 && s.size() == n && *s.begin() == 1 && *s.rbegin() == n;
}