相关疑难解决方法(0)

在Rails中弹出更新后无法运行迁移

我在运行任何迁移时遇到错误:

raj@notebook-pc:~/Desktop/Projects/invoicemanagement$ rails g migration RemoveDescriptionOfGoodsFromInvoiceDetails description_of_goods:string
Warning: You're using Rubygems 1.8.23 with Spring. Upgrade to at least Rubygems 2.1.0 and run `gem pristine --all` for better startup performance.
/var/lib/gems/1.9.1/gems/bundler-1.9.0/lib/bundler/runtime.rb:34:in `block in setup': You have already activated spring 1.3.3, but your Gemfile requires spring 1.3.2. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
    from /var/lib/gems/1.9.1/gems/bundler-1.9.0/lib/bundler/runtime.rb:19:in `setup'

    ** 11 stack trace lines skipped **

    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
Run Code Online (Sandbox Code Playgroud)

所以通过一些谷歌搜索我运行捆绑更新弹簧,它解决了上述错误,我能够删除/添加迁移.再次,如果我运行rake db:migrate,我收到错误:

rake aborted!
StandardError: An error has …
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails rails-migrations

13
推荐指数
1
解决办法
4799
查看次数

标签 统计

rails-migrations ×1

ruby-on-rails ×1