0

Ruby 和 Rails 已经设置好了,但是我在访问“localhost”时总是得到 403 在设置新的 rails proect 时没有错误。这是我的“捆绑安装”有什么遗漏吗?应该有欢迎登机网站,但我得到了 403。当我浏览到 localhost/public 时,我得到了欢迎登机网站。

    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 更改为 home#index。我也得到一个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 禁止错误。

4

1 回答 1

0

你在跑步吗...

rails server

在您的根应用程序目录中?

听起来网络服务器没有运行?

于 2012-05-18T08:29:02.090 回答