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

发布于 2024-10-23 18:59:19 字数 1342 浏览 2 评论 0原文

我在本地机器上使用 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

I am using Mysql on my local mashine. I am having a problem when I tries to push the database.
I have installed taps.

   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

Updated I get the following error now:

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

My database 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

溇涏 2024-10-30 18:59:19

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

I did download sqlite.dll here http://www.sqlite.org/download.html
and did paste it in ruby/bin and myapp/tmp/sockets
Then I could run heroku db:push

江城子 2024-10-30 18:59:19

只需将其添加

gem 'sqlite3'

到“开发”组中的 Gemfile 中即可修复此问题。

Simply adding

gem 'sqlite3'

to my Gemfile within the 'development' group fixed it for me.

耳根太软 2024-10-30 18:59:19

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

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

或者只需使用

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

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

You need to install the Taps gem first. It should work automagically after that.

See if your database.yml file is correctly configured.

Or just use

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

Fill in the required details in the above command.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文