【发布时间】:2018-08-12 03:05:04
【问题描述】:
创建新的 Rails 应用程序时出现以下错误。我运行了 bundle install 但没有成功。
在您的 Gemfile 中列出的任何 gem 源中都找不到 gem 'mysql2 (= 0.3.18)'。
宝石文件
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.5'
# Use mysql as the database for Active Record
gem 'mysql2', '>= 0.3.18', '< 0.5'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
【问题讨论】:
-
检查 rubygems.org/gems/mysql2 并在 Gemfile 中更新版本
标签: ruby-on-rails ruby