Setting up Rails on Amazon AMI EC2 -
i have created amazon ami(linux) instance on ec2. after doing yum stuff, when rails server, cmd shows no errors @ all, when try access http:public_ip:3000 through firefox "unable connect"
i have installed ruby, nodejs, rails, , rvm. have asked on irc , have tried rails s -b http://public_ip:3000
/home/ec2-user/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/socket.rb:205:in >`bind': cannot assign requested address - bind(2) 52.48.217.79:3000 >(errno::eaddrnotavail)
in return.
i've tried ssh elastic ip, , when rails s -b http://public_ip:3000 get:
[2016-01-17 01:43:23] info ruby 2.3.0 (2015-12-25) [x86_64-linux] exiting /home/ec2-user/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/socket.rb:231:in >`getaddrinfo': getaddrinfo: name or service not known (socketerror)
this make sure rails installed , running(i want see default rails page). can help?
you want bind 0.0.0.0.
rails used default, starting 4.2 binds localhost default, command rails s -b 0.0.0.0.
you'll need make sure have rule set allowing tcp traffic port 3000 in ec2 security group
Comments
Post a Comment