Newbie trying to get Rails working

Hello all,

I hope it’s OK for me to ask this here… I’m a bit at a loss as to why my I can’t get a rails app to work for me. Up to this point I’ve been able to:

- Run “rails server” on localhost:3000

- Configure Ubuntu/nginx with passenger and add a virtual host config

o rails new hello_world

o rails generate controller Say hello
And I got the following output:

$ rails generate controller Say hello
Running via Spring preloader in process 12798
      create app/controllers/say_controller.rb
       route get 'say/hello'
      invoke erb
      create app/views/say
      create app/views/say/hello.html.erb
      invoke test_unit
      create test/controllers/say_controller_test.rb
      invoke helper
      create app/helpers/say_helper.rb
      invoke test_unit
      invoke assets
      invoke coffee
      create app/assets/javascripts/say.coffee
      invoke scss
      create app/assets/stylesheets/say.scss

I can access the latter’s root virtual dir (it just prints out the “You’re on Rails” msg), but when I use /say/hello, I get a 404. I don’t see this issue when I run the embedded rails server. Would anyone have seen this before? Maybe it’s a stupid newbie mistake?

Thx,

- Joe

···

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

Can you provide nginx configuration? May be some error in your virtual host
config.

Joe Tseng <joe_tseng@hotmail.com>于2016年9月20日周二 上午8:59写道:

···

Hello all,

I hope it’s OK for me to ask this here… I’m a bit at a loss as to why my I
can’t get a rails app to work for me. Up to this point I’ve been able to:

- Run “rails server” on localhost:3000

- Configure Ubuntu/nginx with passenger and add a virtual host
config

o rails new hello_world

o rails generate controller Say hello

And I got the following output:

$ rails generate controller Say hello

Running via Spring preloader in process 12798

      create app/controllers/say_controller.rb

       route get 'say/hello'

      invoke erb

      create app/views/say

      create app/views/say/hello.html.erb

      invoke test_unit

      create test/controllers/say_controller_test.rb

      invoke helper

      create app/helpers/say_helper.rb

      invoke test_unit

      invoke assets

      invoke coffee

      create app/assets/javascripts/say.coffee

      invoke scss

      create app/assets/stylesheets/say.scss

I can access the latter’s root virtual dir (it just prints out the “You’re
on Rails” msg), but when I use /say/hello, I get a 404. I don’t see this
issue when I run the embedded rails server. Would anyone have seen this
before? Maybe it’s a stupid newbie mistake?

Thx,

- Joe

Sent from Mail <Outlook; for
Windows 10

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;