Matt Gretton
2006-Aug-15 11:09 UTC
[Rails] Problems getting WEBrick server up and running (new to ruby)
Hello, I installed ruby and rails on Monday as I have been hearing great things about both the ruby language and rails framework. Installation went smoothly but I am having problems launching a WEBrick server so see what my newly created rails app is doing! My ruby/ rails installation: 1) Installed ruby directly by compiling the source code. 2) Working on a windows pc, using cygwin to run / compile etc. 3) Ruby appears to be installed correctly and I have been able to successfully run code. 4) Rails installed through ruby gems. 5) Rails appears to be installed correctly i.e. running rails testapp ins cygwin creates all the expected directories for a testapp application. 6) Using MySQL to create databases, appears to be installed correctly I can run SQL from the cygwin command line, create databases tables etc. 7) Created the appropriate databases for the apps and info matches up with database config file. Problem: When I try and start a WEBrick server i.e. navigate to testApp directory in cygwin and run ?ruby ./script/server? it just hangs. There is no output to the screen and I cannot connect to http://localhost:3000. I am pretty sure this is nothing to with the testApp itself as if I create a clean rails application and try and start the web server the same thing happens. Has anyone experienced a problem similar to this or have any advice? Thanks in advance for any replies. Matt. P.S You can ssume my technical skill is low, not only am I new to ruby and rails, I?m pretty new to programming in general. I am quite capable of following instructions however! -- Posted via http://www.ruby-forum.com/.
Max Muermann
2006-Aug-15 22:53 UTC
[Rails] Problems getting WEBrick server up and running (new to ruby)
You may want to try the ruby one-click installer: http://rubyinstaller.rubyforge.org/wiki/wiki.pl What happens if you press Ctrl-C in the console where you started WEBrick? I had a case where this would then start the server correctly after seemingly hanging. Max On 8/15/06, Matt Gretton <matthew.gretton@gmail.com> wrote:> Hello, > > I installed ruby and rails on Monday as I have been hearing great things > about both the ruby language and rails framework. > > Installation went smoothly but I am having problems launching a WEBrick > server so see what my newly created rails app is doing! > > My ruby/ rails installation: > > 1) Installed ruby directly by compiling the source code. > 2) Working on a windows pc, using cygwin to run / compile etc. > 3) Ruby appears to be installed correctly and I have been able to > successfully run code. > 4) Rails installed through ruby gems. > 5) Rails appears to be installed correctly i.e. running rails testapp > ins cygwin creates all the expected directories for a testapp > application. > 6) Using MySQL to create databases, appears to be installed correctly I > can run SQL from the cygwin command line, create databases tables etc. > 7) Created the appropriate databases for the apps and info matches up > with database config file. > > Problem: > > When I try and start a WEBrick server > > i.e. navigate to testApp directory in cygwin and run ''ruby > ./script/server'' > > it just hangs. There is no output to the screen and I cannot connect to > http://localhost:3000. > > I am pretty sure this is nothing to with the testApp itself as if I > create a clean rails application and try and start the web server the > same thing happens. > > Has anyone experienced a problem similar to this or have any advice? > > Thanks in advance for any replies. > > Matt. > > P.S > You can ssume my technical skill is low, not only am I new to ruby and > rails, I''m pretty new to programming in general. I am quite capable of > following instructions however! > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Matt Gretton
2006-Aug-16 13:22 UTC
[Rails] Re: Problems getting WEBrick server up and running (new to r
Max Muermann wrote:> You may want to try the ruby one-click installer: > http://rubyinstaller.rubyforge.org/wiki/wiki.pl > > What happens if you press Ctrl-C in the console where you started > WEBrick? I had a case where this would then start the server correctly > after seemingly hanging. > > MaxHi Max, Thanks for the reply, Both crtl-c and ctrl-d fail to exit after hanging. The console does not seem to respond to any commands. Do you think it is worth me trying to reinstall ruby by compiling the src code again? Could I have installed the WEBrick portion incorrectly? I''d like to get familiar with the installing from src code procedure so I would prefer to use the compiling from src install method rather than the one-click method. Cheers, Matt. -- Posted via http://www.ruby-forum.com/.
Max Muermann
2006-Aug-16 22:28 UTC
[Rails] Re: Problems getting WEBrick server up and running (new to r
I''d try the one-click method first, to see if it is a problem with your system setup somehow. If that does work, you''ll know you have a problem with your compile procedure. In my experience, unless you want to run the very latest bleeding-edge version of Ruby (which I would not recommend anyway), you will not need to compile Ruby. Ever. There are precompiled packages out there for almost every environment. There is no benefit in compiling Ruby yourself. If you really want to get familiar with building packages from source, I recommend picking a different target (for example Lighttpd). Cheers, Max On 8/16/06, Matt Gretton <matthew.gretton@gmail.com> wrote:> Max Muermann wrote: > > You may want to try the ruby one-click installer: > > http://rubyinstaller.rubyforge.org/wiki/wiki.pl > > > > What happens if you press Ctrl-C in the console where you started > > WEBrick? I had a case where this would then start the server correctly > > after seemingly hanging. > > > > Max > > Hi Max, > > Thanks for the reply, > > Both crtl-c and ctrl-d fail to exit after hanging. The console does not > seem to respond to any commands. Do you think it is worth me trying to > reinstall ruby by compiling the src code again? Could I have installed > the WEBrick portion incorrectly? > > I''d like to get familiar with the installing from src code procedure so > I would prefer to use the compiling from src install method rather than > the one-click method. > > Cheers, > > Matt. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Chris VanHaren
2006-Sep-16 04:51 UTC
Re: Problems getting WEBrick server up and running (new to r
Matt Gretton wrote:> When I try and start a WEBrick server > > i.e. navigate to testApp directory in cygwin and run ‘ruby > ./script/server’ > > it just hangs. There is no output to the screen and I cannot connect to > http://localhost:3000.I ran into exactly the same problem when using Ruby as installed by the Cygwin environment. Here is what worked for me -- it may or may not work for you as you compiled Ruby yourself... ruby script/server webrick This forces it to try to use webrick instead of lighhtpd -- I had assumed that it would default to webrick but apparently this is not the case due to something weird going on with Cygwin. It tries to evaluate `lighhtpd -version` deep down in the library, which is apparently hanging. By specifying webrick directly on the command line, this step is bypassed, and I was able to get webrick up and running. Hope this helps. -C. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
> > I ran into exactly the same problem when using Ruby as installed by the > Cygwin environment. Here is what worked for me -- it may or may not > work for you as you compiled Ruby yourself... > > ruby script/server webrick > > This forces it to try to use webrick instead of lighhtpd -- I had > assumed that it would default to webrick but apparently this is not the > case due to something weird going on with Cygwin. It tries to evaluate > `lighhtpd -version` deep down in the library, which is apparently > hanging. By specifying webrick directly on the command line, this step > is bypassed, and I was able to get webrick up and running. > > Hope this helps. > -C.Thanks for the solution! I had the same problem and now it works! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---