Heroku帮助rails迁移错误

发布于 2024-10-23 22:21:27 字数 921 浏览 1 评论 0原文

我尝试过用git在heroku上部署。 Git 控制台:

  Home@PC /c/rails/konkurranceportalen (master)
    $ heroku rake db:migrate
    rake aborted!
    /app/x/home/lib/tasks/statistik.rake:19: synt
    ax error, unexpected ':', expecting ')'
              @existing = Reklamer.where(dato: '@stats[0]').first
                                              ^
    /app/x/home/lib/tasks/statistik.rake:19: synt
    ax error, unexpected ')', expecting kEND
              @existing = Reklamer.where(dato: '@stats[0]').first
                                                           ^
    /app/x/home/Rakefile:7
    (See full trace by running task with --trace)
    (in /app/x/home)

    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.

我在我的应用程序中使用 mysql

I have tried to deploy on heroku with git. Git console:

  Home@PC /c/rails/konkurranceportalen (master)
    $ heroku rake db:migrate
    rake aborted!
    /app/x/home/lib/tasks/statistik.rake:19: synt
    ax error, unexpected ':', expecting ')'
              @existing = Reklamer.where(dato: '@stats[0]').first
                                              ^
    /app/x/home/lib/tasks/statistik.rake:19: synt
    ax error, unexpected ')', expecting kEND
              @existing = Reklamer.where(dato: '@stats[0]').first
                                                           ^
    /app/x/home/Rakefile:7
    (See full trace by running task with --trace)
    (in /app/x/home)

    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.

I am using mysql in my app

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

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

发布评论

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

评论(2

温暖的光 2024-10-30 22:21:27

首先,您的查找器中存在语法错误。

Reklamer.where(dato: '@stats[0]')

其次应该是

Reklamer.where(dato => @stats[0])

heroku db:push 失败,因为您还没有安装 taps gem

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.

要执行此操作:

gem install taps

First of all you have a syntax error in your finder.

Reklamer.where(dato: '@stats[0]')

should be

Reklamer.where(dato => @stats[0])

Secondly heroku db:push is failing as you haven't installed the taps gem yet

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.

To do this run:

gem install taps
阪姬 2024-10-30 22:21:27

安装水龙头并没有解决我的问题,但这确实解决了这个问题:

sudo gem upgrade heroku

Installing taps did not fix it for me, but this did:

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