Heroku帮助rails迁移错误

时间:2011-03-18 08:49:34

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

我尝试使用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

2 个答案:

答案 0 :(得分:2)

首先,你的查找器中有语法错误。

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

应该是

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

其次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.

要执行此操作:

gem install taps

答案 1 :(得分:2)

安装水龙头并没有为我修好,但确实如此:

sudo gem upgrade heroku