Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


am new to ruby. tell me one thing.
i can view my project on browser when i write "ruby
script/server". otherwise i cant view my project on localhost.

what i have to do to view my project always on browser?
pls help

Answers were Sorted based on User's Feedback



am new to ruby. tell me one thing. i can view my project on browser when i write "ruby script..

Answer / rohit kumar shaw

For any Scripting languages like PHP, Ruby etc need a server
(It may be virtual server i.e. localhost) to run their code.

When you run this code in command line ruby script/server it
means you already started your apache server to run the code
and hence you can see your output in browser. If you close
your command line window, it means apache server is stop
working now and then you can't be able to see your output
anymore.

Is This Answer Correct ?    7 Yes 3 No

am new to ruby. tell me one thing. i can view my project on browser when i write "ruby script..

Answer / bidesh mondal

if u run the server (ruby script/server -d) then the command
line will close ,but server is running.The server will run
until the machine is restart. you can start different port
using ruby script/server -p 3001 -d

Is This Answer Correct ?    4 Yes 1 No

am new to ruby. tell me one thing. i can view my project on browser when i write "ruby script..

Answer / manish nautiyal

ruby script/server -d

with -d your server will run always. This is for only your localhost machine. When you deploy your project on live server than you have to use apache to run it.

And to see it in the browser you have to type

http://localhost:3000/

3000 port is by default port for ruby on rails you can change the port by using -p

ruby script/server -d -p 3001

Is This Answer Correct ?    3 Yes 0 No

am new to ruby. tell me one thing. i can view my project on browser when i write "ruby script..

Answer / chandan kumar jha

Configure nginx server for running rails application.It is not required to run ruby script/server only need passenger gem.After restarting system not need to start rails server application automatically started.

Is This Answer Correct ?    0 Yes 0 No

am new to ruby. tell me one thing. i can view my project on browser when i write "ruby script..

Answer / chandanjha1989

Configure nginx server it keep your application always running no need to start rails server every time.Your application automatically restarted after your system restart.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer



More Ruby on Rails Interview Questions

What role do sub-directory app/helpers and app/controllers play?

0 Answers  


Can you explain me how rails implements ajax?

0 Answers  


Explain rails migration.

0 Answers  


How is the model view controller framework used in ruby on rails?

0 Answers  


What is the Install rail package?

0 Answers  






what is a rails migration? Write up a short example of a simple rails migration with a table called customers, a string column called name, and a text column called description?

0 Answers  


what is session and cookies

4 Answers  


how many types of callbacks available in ror?

0 Answers  


Is ruby on rails popular?

0 Answers  


how you can create a controller for subject?

0 Answers  


What is the difference between render and redirect?

0 Answers  


Tell me what is the difference between the observers and callbacks in ruby on rails?

0 Answers  






Categories