无法在Ruby中运行迁移更新

时间:2015-10-18 21:01:57

标签: ruby-on-rails ruby sqlite dbmigrate

我正在使用ruby,我去做一个rake db:migrate,我得到了以下错误:

LoadError:无法加载此类文件 - bundler / setup C:/Sites/raddit/config/boot.rb:4:in <top (required)>' C:/Sites/raddit/config/application.rb:1:in' C:/ Sites / raddit / Rakefile:4:在`

然后我运行bundle exec rake db:migrate并得到此错误

您已要求:   sqlite3&gt; = 0

该捆绑包目前已将sqlite3锁定在1.3.11。 尝试运行bundle update sqlite3

我更新sqlite 3,因为它说我已经删除了我的gemfile但是没有任何作用

这是我的Gemfile

  source 'https://rubygems.org'

gem 'devise', '~> 3.5', '>= 3.5.2'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.3', '>= 1.3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer',  platforms: :ruby


# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',          group: :doc



# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin]

1 个答案:

答案 0 :(得分:0)

要解决这个问题,我刚刚重新安装了bundler,只需执行gem install bundler,然后运行bundle install。它将重新安装所有过去的宝石,并应解决问题。