Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/56.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 解析文件时出错;无法部署到Heroku_Ruby On Rails_Ruby_Git_Heroku - Fatal编程技术网

Ruby on rails 解析文件时出错;无法部署到Heroku

Ruby on rails 解析文件时出错;无法部署到Heroku,ruby-on-rails,ruby,git,heroku,Ruby On Rails,Ruby,Git,Heroku,很难说服希罗库。我正在使用最新版本的rails和ruby。每次我尝试上传到heroku时,我都会收到这条消息。 [守则] $git推送heroku主机 警告:已将IP地址“50.19.85.132”的RSA主机密钥永久添加到已知主机列表中。 正在初始化存储库,完成。 计数对象:69,完成。 增量压缩最多使用8个线程。 压缩对象:100%(58/58),完成。 写入对象:100%(69/69),15.99千字节/秒,完成。 总计69(增量5),重复使用0(增量0) [/code]我认为您需要在您的

很难说服希罗库。我正在使用最新版本的rails和ruby。每次我尝试上传到heroku时,我都会收到这条消息。 [守则] $git推送heroku主机 警告:已将IP地址“50.19.85.132”的RSA主机密钥永久添加到已知主机列表中。 正在初始化存储库,完成。 计数对象:69,完成。 增量压缩最多使用8个线程。 压缩对象:100%(58/58),完成。 写入对象:100%(69/69),15.99千字节/秒,完成。 总计69(增量5),重复使用0(增量0)


[/code]

我认为您需要在您的文件中添加以下代码

gem 'rails_12factor', group: :production
ruby "2.1.1"
您可以按照以下步骤操作


对于Rails'4.1.6'版本,所需的Ruby版本必须大于或等于(=1.9.3


因此,添加任何ruby版本,如1.9.3p2、1.9.3-p547、2.0.0-p576、2.1.1等

Heroku遇到API问题,暂时禁用了API访问


这可能是问题的一部分,因为当前无法通过CLI或Heroku仪表板部署、获取或更新应用程序

我使用的是ruby 2.1.3p242,我想问题是我可能在我的计算机上使用了2.1.3,但我需要在Heroku上安装相同的版本?我没有意识到我必须在两者上都安装它。今晚我要按照这些指示再做一次尝试
    # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'

gem 'rails', '4.1.6' 

# Use sqlite3 as the database for Active Record



group :production do

    gem 'pg'

end



group :development do

    gem 'sqlite3'

end





# Use SCSS for stylesheets

gem 'sass-rails', '~> 4.0.3'

# Use Uglifier as compressor for Javascript assets

gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views

gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/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



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

gem 'spring',        group: :development
gem 'rails_12factor', group: :production
ruby "2.1.1"