Heroku错误:没有这样的文件加载--sqlite3 / sqlite3_native

时间:2011-03-18 16:44:55

标签: ruby-on-rails ruby-on-rails-3 heroku

我在我当地的mashine上使用Mysql。我试图推送数据库时遇到问题。 我已经安装了水龙头。

   Home@PC /c/rails/konkurranceportalen (master)
    $ heroku db:push
    Taps Load Error: no such file to load -- sqlite3/sqlite3_native
    You may need to install or update the taps gem to use db commands.
    On most systems this will be:

    sudo gem install taps

更新我现在收到以下错误:

Ruby.exe system error
The program could not be started because sqlite3.dll is missing on the computer.

我的数据库yml:

# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
# gem 'mysql', '2.8.1'

development:
  adapter: mysql
  database: konkurranceportalen
  encoding: utf8
  pool: 5
  username: root
  password: 
  socket: C:/xampp/mysql/bin/mysqld.sock
  host: 127.0.0.1

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.

test:
  adapter: mysql
  database: rails_t
  encoding: utf8
  pool: 5
  username: root
  password: 
  socket: C:/xampp/mysql/bin/mysqld.sock
  host: 127.0.0.1

production:
  adapter: mysql
  database: rails_p
  encoding: utf8
  pool: 5
  username: root
  password: 
  socket: C:/xampp/mysql/bin/mysqld.sock
  host: 127.0.0.1

3 个答案:

答案 0 :(得分:1)

我在这里下载了sqlite.dll http://www.sqlite.org/download.html 并将它粘贴在ruby / bin和myapp / tmp / sockets中 然后我可以运行heroku db:push

答案 1 :(得分:1)

简单地添加

gem 'sqlite3'

到'开发'组中我的Gemfile为我修复了它。

答案 2 :(得分:0)

您需要先安装Taps gem。之后它应该自动工作。

查看您的database.yml文件是否已正确配置。

或者只是使用

$ heroku db:push mysql://root:mypass@localhost/mydb

在上述命令中填写所需的详细信息。