2014-11-06 34 views
1

我是Rails的新手,我正在跟隨Skillshare(http://www.skillshare.com/classes/technology/Ruby-on-Rails-in-30-Days-Build-Your-First-Web-App/)上的教程。localhost:3000生成新腳手架後不可用

在爲郵報生成新腳手架的時候,我從終端獲得了所有正確的輸出。但是,當我在瀏覽器中刷新本地主機:3000時,我收到了一條消息:「此網頁不可用」,但我期望得到「ActiveRecord :: PendingMigrationError」的錯誤消息。我繼續運行db rake,但我仍然收到「此網頁不可用」消息。任何幫助將不勝感激。以下是我輸入到終端中的內容。

allison:crumblr aehn83$ rails generate scaffold Post title:string content:text --no-stylesheets 
     invoke active_record 
    identical db/migrate/20141106005237_create_posts.rb 
    identical app/models/post.rb 
     invoke test_unit 
    identical  test/models/post_test.rb 
    identical  test/fixtures/posts.yml 
     invoke resource_route 
     route resources :posts 
     invoke scaffold_controller 
    identical app/controllers/posts_controller.rb 
     invoke erb 
     exist  app/views/posts 
    identical  app/views/posts/index.html.erb 
    identical  app/views/posts/edit.html.erb 
    identical  app/views/posts/show.html.erb 
    identical  app/views/posts/new.html.erb 
    identical  app/views/posts/_form.html.erb 
     invoke test_unit 
    identical  test/controllers/posts_controller_test.rb 
     invoke helper 
    identical  app/helpers/posts_helper.rb 
     invoke  test_unit 
    identical  test/helpers/posts_helper_test.rb 
     invoke jbuilder 
    identical  app/views/posts/index.json.jbuilder 
    identical  app/views/posts/show.json.jbuilder 
     invoke assets 
     invoke coffee 
    identical  app/assets/javascripts/posts.js.coffee 
     invoke scss 
+0

您是否使用'rails s'運行服務器? – 2014-11-06 01:32:11

回答

0

運行

rake db:migrate 

然後運行服務器

rails s 
-1

聽起來像你的軌道服務器沒有運行。

我通常在僅使用一個終端時有時犯同樣的錯誤。更改

0

看起來你跑分貝耙

代替

耙分貝後 確保您重新啓動服務器rails s:遷移

錯誤說「正在遷移」它談論遷移數據庫

相關問題