Ruby on rails 您要查找的页面没有';t exist-heroku+;轨道
你好。根据Hartl的书RubyonRails教程,我正在尝试在heroku上部署rails应用程序。我推了heroku master,Ruby on rails 您要查找的页面没有';t exist-heroku+;轨道,ruby-on-rails,ruby,postgresql,heroku,sqlite,Ruby On Rails,Ruby,Postgresql,Heroku,Sqlite,你好。根据Hartl的书RubyonRails教程,我正在尝试在heroku上部署rails应用程序。我推了heroku master,$git,操作正确。但是当我使用$heroku open时,有一个文本 `您要查找的页面不存在 您可能键入了错误的地址,或者页面可能已移动。当我使用$rails s在本地启动rails时,没有错误,127.0.0.1:3000运行良好。但是,如果我使用$rails s s-e production,就会出现类似的错误 您要查找的页面不存在。你可能打错了 地址或页
$git,操作正确。但是当我使用$heroku open
时,有一个文本
`您要查找的页面不存在
您可能键入了错误的地址,或者页面可能已移动。当我使用$rails s
在本地启动rails时,没有错误,127.0.0.1:3000运行良好。但是,如果我使用$rails s s-e production
,就会出现类似的错误
您要查找的页面不存在。你可能打错了
地址或页面可能已移动
顺便说一句,根据相似的问题,我试图改变
config.assets.compile=true
My Gemfile.lock:
remote: https://rubygems.org/
specs:
actionmailer (4.0.2)
actionpack (= 4.0.2)
mail (~> 2.5.4)
actionpack (4.0.2)
activesupport (= 4.0.2)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.2)
activesupport (= 4.0.2)
builder (~> 3.1.0)
activerecord (4.0.2)
activemodel (= 4.0.2)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.2)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.2)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
addressable (2.3.5)
arel (4.0.1)
atomic (1.1.14)
builder (3.1.4)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.3)
erubis (2.7.0)
excon (0.25.3)
execjs (2.0.2)
heroku (3.2.1)
heroku-api (~> 0.3.7)
launchy (>= 0.3.2)
netrc (~> 0.7.7)
rest-client (~> 1.6.1)
rubyzip
heroku-api (0.3.15)
excon (~> 0.25.1)
hike (1.2.3)
i18n (0.6.9)
jbuilder (1.5.3)
activesupport (>= 3.0.0)
multi_json (>= 1.2.0)
jquery-rails (3.0.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
launchy (2.4.2)
addressable (~> 2.3)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.8.2)
netrc (0.7.7)
pg (0.17.1-x86-mingw32)
polyglot (0.3.3)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.2)
actionmailer (= 4.0.2)
actionpack (= 4.0.2)
activerecord (= 4.0.2)
activesupport (= 4.0.2)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.2)
sprockets-rails (~> 2.0.0)
railties (4.0.2)
actionpack (= 4.0.2)
activesupport (= 4.0.2)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.1.1)
rdoc (3.12.2)
json (~> 1.4)
rest-client (1.6.7)
mime-types (>= 1.16)
rubyzip (1.1.0)
sass (3.2.13)
sass-rails (4.0.1)
railties (>= 4.0.0, < 5.0)
sass (>= 3.1.10)
sprockets-rails (~> 2.0.0)
sdoc (0.3.20)
json (>= 1.1.3)
rdoc (~> 3.10)
sprockets (2.10.1)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.8-x64-mingw32)
sqlite3 (1.3.8-x86-mingw32)
sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3)
thor (0.18.1)
thread_safe (0.1.3)
atomic
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.1.0)
coffee-rails
tzinfo (0.3.38)
uglifier (2.4.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
PLATFORMS
x64-mingw32
x86-mingw32
DEPENDENCIES
coffee-rails (~> 4.0.0)
heroku
jbuilder (~> 1.2)
jquery-rails
pg
rails (= 4.0.2)
sass-rails (~> 4.0.0)
sdoc
sqlite3 (= 1.3.8)
sqlite3-ruby
turbolinks
uglifier (>= 1.3.0)
routes.rb:
FirstApp::Application.routes.draw do
many comments
end
它是用railsnew
创建的项目。如果我尝试获取其他页面,也会收到相同的消息。几周前我遇到了一些类似的问题-可能有很多事情,但这里有一些事情是我第一次这样做时忘记的
迁移您的prod dbheroku运行rake db:Migrate
确保heroku拥有您的预编译资产-rake资产:precompile
,然后再次推送到heroku
另外,请检查,Hartl提到您需要定义一个root
路由,以便默认rails页面在heroku上工作。您可以包括您的config/routes.rb
?如果您不访问/
,而是访问特定的URL,会发生什么?Op消息会被更新。它是用railsnew
创建的项目。如果我尝试使用另一个页面,则会出现相同的消息。遗憾的是,这没有帮助。添加了一件事-您是否添加了根路径
路由?确实如此。我怎么错过了?很抱歉占用您的时间,谢谢您的帮助。链接“此部分”不再工作,返回一个错误
FirstApp::Application.routes.draw do
many comments
end