如何调试Ruby-on-in-Rails Mac OSX的升级



需要帮助调试升级到Ruby和Rails Gems,以启动WebService,然后推向Heroku。

我已经尝试升级Ruby版本和Rails以使我的Web服务再次启动我的应用程序,以满足Heroku的要求:

"新应用的默认红宝石将是最少的版本 最近一个。例如,当Ruby 2.6.0出来时,Ruby 2.5.x将变为默认值。"

我一直遇到此错误:

[!]有一个错误解析Gemfile:虚拟要求[Ruby 2.5.0"]。邦德勒无法继续。

#来自/user/waf-mbp/documents/ruby/ror/ror/2100_solution_blogs/gemfile:2 #--------------------------------------------------------------- #源'https://rubygems.org'

Ruby" Ruby 2.5.0"

我需要帮助解决此错误,而不管Gemfile中显示的版本如何。我需要将更新推向Heroku。

我正在使用PG为网络服务供电。

运行" rails s"后,我会得到此错误:Bundler找不到宝石" Railties"的兼容版本: 在快照(gemfile.lock(中: 铁轨(= 5.2.0(

在Gemfile中: 将咖啡轨(〜> 4.1.0(解析为4.1.1,这取决于 铁轨(> = 4.0.0,< 5.1.x(

jquery-rails was resolved to 4.3.3, which depends on
  railties (>= 4.2.0)
rails (= 5.2.0) was resolved to 5.2.0, which depends on
  railties (= 5.2.0)
sass-rails (~> 5.0) was resolved to 5.0.7, which depends on
  railties (>= 4.0.0, < 6)

运行bundle update将仅使用您的宝石中的宝石可能会解决冲突。

这是我的gemfile:

source 'https://rubygems.org'
ruby "ruby 2.5.0"
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '5.2.3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# 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 'puma'
gem 'rake'
group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'
end
group :development do
  gem 'sqlite3'
end
group :production do
  gem 'pg'
  gem 'rails_12factor'
end

您在Gemfile中有一个小的语法错误:Ruby解释器的行应该简单地为

ruby "2.5.0"

最新更新