2012-05-18 96 views
0

Ruby和Rails已經設置好了,但我總是在訪問「localhost」時得到403 在安裝新的rails項目時沒有錯誤。這是我的'捆綁安裝' 任何遺漏?應該有受歡迎的網站,但我得到了403.當我衝浪到localhost/public我得到了歡迎登陸網站。403在Ruby on Rails安裝之後403

Using rake (0.9.2.2) 
Using i18n (0.6.0) 
Using multi_json (1.3.5) 
Using activesupport (3.2.3) 
Using builder (3.0.0) 
Using activemodel (3.2.3) 
Using erubis (2.7.0) 
Using journey (1.0.3) 
Using rack (1.4.1) 
Using rack-cache (1.2) 
Using rack-test (0.6.1) 
Using hike (1.2.1) 
Using tilt (1.3.3) 
Using sprockets (2.1.3) 
Using actionpack (3.2.3) 
Using mime-types (1.18) 
Using polyglot (0.3.3) 
Using treetop (1.4.10) 
Using mail (2.4.4) 
Using actionmailer (3.2.3) 
Using arel (3.0.2) 
Using tzinfo (0.3.33) 
Using activerecord (3.2.3) 
Using activeresource (3.2.3) 
Using bundler (1.1.3) 
Using coffee-script-source (1.3.3) 
Using execjs (1.3.2) 
Using coffee-script (2.2.0) 
Using rack-ssl (1.3.2) 
Using json (1.7.3) 
Using rdoc (3.12) 
Using thor (0.14.6) 
Using railties (3.2.3) 
Using coffee-rails (3.2.2) 
Using jquery-rails (2.0.2) 
Using rails (3.2.3) 
Using sass (3.1.18) 
Using sass-rails (3.2.5) 
Using sqlite3 (1.3.6) 
Using uglifier (1.2.4) 

我試圖創建新的視圖和控制器$ rails generate controller home index 和改變了我的routes.rb回家#指數。我也得到了403.

任何想法?

編輯:

rails server -p 3001 -e test 
=> Booting WEBrick 
=> Rails 3.2.3 application starting in test on http://0.0.0.0:3001 
=> Call with -d to detach 
=> Ctrl-C to shutdown server 
[2012-05-18 10:50:16] INFO WEBrick 1.3.1 
[2012-05-18 10:50:16] INFO ruby 1.9.3 (2011-10-30) [x86_64-linux] 
[2012-05-18 10:50:16] INFO WEBrick::HTTPServer#start: pid=26471 port=3001 

在瀏覽該網站沒有任何反應。只有得到一個Apache 403禁止錯誤。

回答

0

是否正在運行...

rails server 
在你的根應用程序目錄

聽起來像網絡服務器沒有運行?

+0

是的,我試過了,沒有'rails server'在 –

+0

之前還有一個'rake db:create'並且你要去http:// localhost:3000 /? – creativetechnologist

+0

即時通訊使用我的域名的子域名。所以我瀏覽到這個子域,並得到403.如果我使用子域:3000我得到一個連接錯誤。 –