升级到Rails 5.0 - 更新gem文件/ gemfile.lock

时间:2017-05-05 10:38:34

标签: ruby-on-rails ruby rubygems ruby-on-rails-5

我有一个现有的应用程序,我希望从rails 4.2.5更新到Rails 5.0(尚未做5.1)和ruby 2.3.0到2.4.0。我正在尝试更新gemfile但遇到一些依赖性问题,我认为这些问题与我的gemfile.lock有关。这是我命令行的快照 - enter image description here

这是我的宝石文件 -

     source 'https://rubygems.org'

     ruby '2.4.0'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '5.0.1'
gem 'railties', '~> 5.0'
gem 'actionpack', '~> 5.0.1', '>= 5.0.1'
gem 'rails-dom-testing', '~> 2.0', '>= 2.0.2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/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

gem 'bootstrap-sass', '~> 3.3', '>= 3.3.6'
# for styling - not happy but best for grid usage I need (I hope!!)

gem 'simple_form', '~> 3.2', '>= 3.2.1'
# for building form templates on the site

gem 'devise', '~> 4.0'
# for creating sign-in / sign-up process

gem 'paperclip', '~> 4.3', '>= 4.3.2'
# for using images on the site

gem 'jquery-ui-rails', '~> 5.0', '>= 5.0.5'
# Adding Datepicker

gem 'jquery-turbolinks', '~> 0.2.1'
# to fix problems with turbolinks

gem 'stripe', '~> 1.38'
# for payments / bookings

gem 'omniauth', '~> 1.3', '>= 1.3.1'
gem 'omniauth-twitter', '~> 1.2', '>= 1.2.1'
gem 'omniauth-facebook', '~> 3.0'
# social logins

gem 'money-rails'
# add money feature

gem 'geocoder', '~> 1.3', '>= 1.3.7'
# for google maps / locations

gem 'rubocop', '~> 0.42.0'
# for code styling / errors

gem 'counter_culture', '~> 0.1.33'
# for counting bookings and quantity




# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'

  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
end

我的Gemfile.lock文件包含以前更新的版本。我看到有关是否只是删除此文件的混合消息,因为它似乎只打开其他罐头的蠕虫,如果我删除它。我应该简单地删除gemfile上的任何引用为'版本'吗?任何帮助表示赞赏。

2 个答案:

答案 0 :(得分:0)

跑步:

bundle update

它会更新你的Gemfile.lock

答案 1 :(得分:-2)

如何完全删除Gemfile.lock并再次运行bundle install;)哈哈