0

What could possibly be wrong? I run this file:

require 'sinatra' 
get '/' do 
  "Just Do It" 
end

Server starts up:

== Sinatra (v2.0.0) has taken the stage on 3000 for development with backup from Thin
Thin web server (v1.7.1 codename Muffin Mode)
Maximum connections set to 1024
Listening on 127.0.0.1:3000, CTRL+C to stop

(I set the address and port because it is what I have in my vagrantfile.

However I get nothing, either in Chrome or Firefox. I've tried various config.ru's and changed the file above to an ru extension to try rackup but that hasn't worked either.

I have uninstalled and reinstalled the Mustermann and Sinatra gems and made sure I had the gems that are required in base.rb.

Any ideas?

matt
  • 78,533
  • 8
  • 163
  • 197
stuartambient
  • 127
  • 1
  • 1
  • 10
  • Does it work outside of vagrant? – Noah Clark Jul 01 '17 at 18:09
  • Using the 0.0.0.0 binding seemed to make a slight difference if i run the code with ruby. I can then see the Sinatra 'welcome' page but no get / . – stuartambient Jul 01 '17 at 19:05
  • Using the 0.0.0.0 binding seemed to make a slight difference if i run the code with ruby. I can then see the Sinatra 'welcome' page but no get / . Using rackup nothing but some errors. I might have a problem with ruby itself and am considering asking in another post. I have the path /.rvm/rubies/ruby/2.4.1/lib/ruby/site_ruby/2.4.0/... Is that normal? I think site_ruby is for global addons, but why would 2.4.0 be in a 2.4.1 directory. – stuartambient Jul 01 '17 at 19:12
  • What if you just try the code instead of binding to all up addresses out side of vagrant. I assume that works. If so, I'm not familiar with vagrant but that path looks fun. You can always try 'rvm implode' – Noah Clark Jul 01 '17 at 21:54

0 Answers0