Search code examples
ruby-on-railsrubysqlitedbmigrate

Cannot run a migration update in Ruby


Im using ruby and I go to do a rake db:migrate which I get the follow error:

LoadError: cannot load such file -- 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:in `

Then I run bundle exec rake db:migrate and get this error

You have requested: sqlite3 >= 0

The bundle currently has sqlite3 locked at 1.3.11. Try running bundle update sqlite3

I update sqlite 3 as it says and Ive deleted my gemfile but yet nothing works

Here is my 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]

Solution

  • To fix the problem I just re installed bundler to do this just do gem install bundler and then ran bundle install. It will re install all the past gems and should fix the problem.