找不到有效的 gem 'mysql2-0.3.18.gem'
Could not find a valid gem 'mysql2-0.3.18.gem'
我是 rails 上 Ruby 的新手,我在 Rails 安装期间遇到了这个问题。我搜索了很多并尝试了很多解决方案,这些解决方案在 Whosebug 上可用,但对我没有任何帮助。请帮助我如何摆脱这个问题..
我以前遇到过这个问题,你得到这个方法的原因是因为你试图从 https
网站下载。
我猜你正试图在你的 gem 文件中安装所有 gem,但 bundle install
没有成功。它会给你这样的消息
bundler cannot continue. Please make sure gem install samplegem succeeds
更改 gem 文件中的以下行
source 'https://rubygems.org'
到
source 'http://rubygems.org'
和运行bundle
或者,您可以执行以下操作
gem install mysql2 -s http://rubygems.org
无论哪种方式,您都应该能够安装 gem。
您是否已经在您的机器上安装了 mysql?同样的经历也发生在我身上。我正在使用虚拟环境并尝试安装 gem mysql2,但我忘记了我的 "main" 环境中没有 mysql。
我运行以下和mysql2安装成功。
gem install mysql2 -s http://rubygems.org
But the problem remaied the same when re ran the "bundle install"
我是 rails 上 Ruby 的新手,我在 Rails 安装期间遇到了这个问题。我搜索了很多并尝试了很多解决方案,这些解决方案在 Whosebug 上可用,但对我没有任何帮助。请帮助我如何摆脱这个问题..
我以前遇到过这个问题,你得到这个方法的原因是因为你试图从 https
网站下载。
我猜你正试图在你的 gem 文件中安装所有 gem,但 bundle install
没有成功。它会给你这样的消息
bundler cannot continue. Please make sure gem install samplegem succeeds
更改 gem 文件中的以下行
source 'https://rubygems.org'
到
source 'http://rubygems.org'
和运行bundle
或者,您可以执行以下操作
gem install mysql2 -s http://rubygems.org
无论哪种方式,您都应该能够安装 gem。
您是否已经在您的机器上安装了 mysql?同样的经历也发生在我身上。我正在使用虚拟环境并尝试安装 gem mysql2,但我忘记了我的 "main" 环境中没有 mysql。
我运行以下和mysql2安装成功。
gem install mysql2 -s http://rubygems.org But the problem remaied the same when re ran the "bundle install"