ROR +无法通过Bundler安装Gem

时间:2013-11-17 16:49:38

标签: heroku ruby-on-rails-3.2 bundler

将示例应用程序部署到Heroku时出错。

Rails版本 - 3.2.13和Ruby 1.9.3

但是却遇到了Bundler的奇怪问题

enter image description here

错误控制台:Windows CMD提示 - 这里控制台提到了关于ruby 2但1.9.3已经安装了我的机器版本。

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using Bundler version 1.3.2
       New app detected loading default bundler cache
       Running: bundle install --without development:test --path vendor/bundle -
-binstubs vendor/bundle/bin
       Unfortunately, a fatal error has occurred. Please see the Bundler
       troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
       /tmp/build_07f8cd6f-1940-4d6a-9073-77757dd85710/vendor/ruby-2.0.0/lib/rub
y/2.0.0/uri/generic.rb:214:in `initialize': the scheme http does not accept regi
stry part: :443 (or bad hostname?) (URI::InvalidURIError)
       from /tmp/build_07f8cd6f-1940-4d6a-9073-77757dd85710/vendor/ruby-2.0.0/li
b/ruby/2.0.0/uri/http.rb:84:in `initialize'
       from /tmp/build_07f8cd6f-1940-4d6a-9073-77757dd85710/vendor/ruby-2.0.0/li
b/ruby/2.0.0/uri/common.rb:214:in `new'

的Gemfile

source 'https:/rubygems.org'    
gem 'rails', '3.2.13'    
gem 'ruby', '1.9.3'   # Addition of ruby verstion for Heroku    
gem 'pg'    
# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end    
gem 'jquery-rails'

没有办法解决它。

1 个答案:

答案 0 :(得分:1)

您的Gemfile不正确。它应该以下列方式包含Ruby:

source "https://rubygems.org"
ruby "1.9.3"
# ...

如此处所述https://devcenter.heroku.com/articles/ruby-versions