lundi 8 février 2016

Problems connecting to rails server

I'm working at getting a very basic ruby/rails environment up and running, and I am presently unable to connect to it.

I'm working on a Macbook (updates current), and I've got an Ubuntu VM running that I'm using as my test server.

I have port-forwarding set up for connecting with the VM

  • 8083 to 80 (http)
  • 9307 to 3306 (mysql)
  • 2223 to 22 (ssh)
  • 3010 to 3000 (WEBrick)

Using this, I can ssh in, and I can hit "non-rails" sites just fine via Apache. What I can't do is get a basic "hello-world" screen up for the rails environment. I CAN get there if I cut out the VM and start WEBrick ("rails s") directly from the Mac environment and then go to localhost's port 3000, but when I attempt the same thing on the VM and then try to hit port 3010 the same way, I get back a "no data received" response.

WEBrick appears to be running just fine

myserver$ rails s
=> Booting WEBrick
=> Rails 4.2.5.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2016-02-08 09:01:30] INFO  WEBrick 1.3.1
[2016-02-08 09:01:30] INFO  ruby 2.1.5 (2014-11-13) [x86_64-linux-gnu]
[2016-02-08 09:01:30] INFO  WEBrick::HTTPServer#start: pid=3756 port=3000

Turning Apache on/off does not change anything beyond changing the accessibility of the content served by Apache.

I've tried monitoring "log/development.log" in my rails application, and I've also poked around to see if I noticed any clues in any of the various log files under "/var/log", but nothing's jumping out at me.

I am not doing anything fancy here. I just want to get to the "Welcome Aboard!" screen for rails. I thought that getting started here would be as simple as setting up the port-forwarding, creating the rails-application, and hitting it from my browser; it's been a few hours now and I'm getting nowhere with this. Apologies if this has a super easy solution that I'm just not seeing.

Aucun commentaire:

Enregistrer un commentaire