开发者

Heroku help rails migrate error

开发者 https://www.devze.com 2023-02-18 02:53 出处:网络
I have tried to deploy on heroku with git. Git console: Home@PC /c/rails/konkurranceportalen (master) $ heroku rake db:migrate

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 '开发者_StackOverflow社区)', 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


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


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

sudo gem upgrade heroku
0

精彩评论

暂无评论...
验证码 换一张
取 消