Ruby on rails 在RubyonRails上使用Postgres,不能使用Heroku(Mavericks)部署的链接
这是我第三次尝试从头开始安装RubyonRails。这与我每次使用3个不同教程时遇到的问题相同。当一切都完成后,我$git推heroku master,它会给我一个链接,不会显示我的git web应用程序Ruby on rails 在RubyonRails上使用Postgres,不能使用Heroku(Mavericks)部署的链接,ruby-on-rails,git,sqlite,postgresql,heroku,Ruby On Rails,Git,Sqlite,Postgresql,Heroku,这是我第三次尝试从头开始安装RubyonRails。这与我每次使用3个不同教程时遇到的问题相同。当一切都完成后,我$git推heroku master,它会给我一个链接,不会显示我的git web应用程序 ###### WARNING: Include 'rails_12factor' gem to enable all platform features See https://devcenter.heroku.com/articles/rails-integration-gems
###### WARNING:
Include 'rails_12factor' gem to enable all platform features
See https://devcenter.heroku.com/articles/rails-integration-gems for more information.
###### WARNING:
You have not declared a Ruby version in your Gemfile.
To set your Ruby version add this line to your Gemfile:
ruby '2.0.0'
# See https://devcenter.heroku.com/articles/ruby-versions for more information.
###### WARNING:
No Procfile detected, using the default web server (webrick)
https://devcenter.heroku.com/articles/ruby-default-web-server
-----> Discovering process types
Procfile declares types -> (none)
Default types for Ruby -> console, rake, web, worker
-----> Compressing... done, 21.2MB
-----> Launching... done, v6
http://immense-dusk-3361.herokuapp.com/ deployed to Heroku
To git@heroku.com:immense-dusk-3361.git
* [new branch] master -> master
MacBook-Air:omrails demo$ heroku open
Opening immense-dusk-3361... done'
当我使用该链接时,它不会让我看到通常在Localhost上看到的东西:3000。我按照教程从sqlite更改为postgres。以下是我的结论:
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
#
default: &default
adapter: postresql
pool: 5
timeout: 5000
development:
adapter: postresql
database: my_database_development
pool: 5
host: localhost
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: db/test.sqlite3
production:
<<: *default
database: db/production.sqlite3'
以下链接是我使用过的一些资源:
注意:我使用一个月的Rails教程来学习实际的编码,但由于我使用的是iOS Mavericks,所以无法安装RailsInstaller使用的工具包。我使用的是:安装Ruby on Rails·Mac OS X Mavericks
丹尼尔·凯霍教程
提前感谢你帮助这个可怜的笨蛋!永远不要停止做一个了不起的人 当我使用这个链接时,它不会让我看到我通常会看到的东西——你在本地环境中看到了什么,而在heroku上看不到什么?我检查了url,它给出了一个404错误,这是你的问题吗?我认为它应该显示出欢迎你乘坐Ruby on Rails!页面-Heroku给我的链接显示您正在查找的页面不存在。您可能键入了错误的地址,或者页面可能已移动。请在命令提示符下运行heroku run rake db:migrate。另外,在config/environments/production.rb中,将config.consummed\u all\u requests\u local=true并提交更改。这会给你一个stacktrace,让你知道哪里出了问题。您还可以从命令提示符下运行heroku日志,并在此处显示日志。