相关疑难解决方法(0)

我的应用程序中默认的"欢迎登机"页面在哪里?

我搜索了我的应用程序的目录,我找不到默认的rails Welcome Aboard页面的html页面.我也找不到routes.rb中默认Welcome Aboard页面的路由.我的rails应用程序如何路由http://localhost:3000/到我的应用程序中不存在的页面?

rails服务器生成以下信息:

Started GET "/" for 127.0.0.1 at 2013-07-31 02:00:13 -0600
Processing by Rails::WelcomeController#index as HTML
  Rendered /Users/7stud/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/templates/rails/welcome/index.html.erb (0.1ms)
Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.0ms)
Run Code Online (Sandbox Code Playgroud)

因此,在我看来,有一个控制器埋在某处处理请求的宝石中.

ruby-on-rails ruby-on-rails-4

50
推荐指数
1
解决办法
2万
查看次数

Heroku问题:您要查找的页面不存在

我按照书直到第5章完成,当我推送到Heroku时,它在我的linux工作站上工作正常,所有数据都正确推送但是当我尝试打开Heroku时(http://vivid-sky-685.heroku.com)

我收到了404消息.

您要查找的页面不存在.您可能输错了地址或页面可能已移动.

以下是我Gemfile的申请

source 'http://rubygems.org'
gem 'rails', '3.0.5'
gem 'sqlite3'

group :development do
  gem 'rspec-rails', '2.5.0'
end

group :test do
  gem 'rspec', '2.5.0'
  gem 'webrat', '0.7.1'
  gem 'spork', '0.9.0.rc4'
end

gem 'rake','~> 0.8.7'
Run Code Online (Sandbox Code Playgroud)

什么想法可能会出错?

@odin这是我的heroku日志,谢谢

2011-09-11T10:41:57+00:00 heroku[router]: GET vivid-sky-685.heroku.com/y dyno=web.1 queue=0 wait=0ms service=5ms status=404 bytes=728
2011-09-11T10:41:57+00:00 app[web.1]: 
2011-09-11T10:41:57+00:00 app[web.1]: 
2011-09-11T10:41:57+00:00 app[web.1]: Started GET "/y" for 93.186.31.80 at 2011-09-11 03:41:57 -0700
2011-09-11T10:41:57+00:00 app[web.1]: 
2011-09-11T10:41:57+00:00 app[web.1]: ActionController::RoutingError (No route matches "/y"):
2011-09-11T10:41:57+00:00 app[web.1]:   
2011-09-11T10:41:57+00:00 app[web.1]: 
2011-09-11T10:41:57+00:00 app[web.1]: 
2011-09-11T10:41:57+00:00 heroku[nginx]: …
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails

24
推荐指数
3
解决办法
4万
查看次数

标签 统计

ruby-on-rails ×2

ruby-on-rails-4 ×1