From: Luis Lavena Date: 2007-12-28T01:39:58+09:00 Subject: Re: Port Ruby on Rails Application On Dec 27, 12:48 pm, Snoop1990 Snoop1990 wrote: > Michael Greenly wrote: > > Yes Rails applications can be sensitive to the version of Ruby, Rails or > > Gems installed > > > Telling us what error you got would help. > > > On Dec 27, 2007 9:11 AM, Snoop1990 Snoop1990 > > Ok, I use my first one, this application run on Freebsd without any > errors! I copied the hole directory and now try to start the internal > web server webrick and get this : > > $ ./script/server > /script/../config/boot.rb:18:in `require': no such file to load -- > rubygems (LoadError) > from ./script/../config/boot.rb:18 > from ./script/server:2:in `require' > from ./script/server:2 > > I thought maybe Rails does not work, so I started a new projekt with the > "rails " command and launched the internal webserver inside > this new project. It works but it looks a bit different during the boot > process: > script/server is yelling at you that rubygems is not installed, but then you said that using 'rails command' manage to create a empty application. How did you managed to install Rails _without_ rubygems? Maybe you used the zip or tgz package available in rubyforge, which you should have pointed in your first mail: - I installed ruby using freebsd ports - I installed rails grabbing the zip package and running setup. - THEN i get this error message. Will be cool when users start writting that kind of reports of their problems, but still we live in a imperfect world ;-) > $ ./script/server > => Booting WEBrick... > => Rails application started onhttp://127.0.0.1:3000 > => Ctrl-C to shutdown server; call with --help for options > [2007-12-27 16:42:12] INFO WEBrick 1.3.1 > [2007-12-27 16:42:12] INFO ruby 1.8.6 (2007-06-07) [i486-linux] > [2007-12-27 16:42:12] WARN TCPServer Error: Address already in use - > bind(2) > /usr/lib/ruby/1.8/webrick/utils.rb:73:in `initialize': Address already > in use - bind(2) (Errno::EADDRINUSE) > from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `new' > from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `create_listeners' > from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `each' > from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `create_listeners' > from /usr/lib/ruby/1.8/webrick/server.rb:75:in `listen' > from /usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize' > from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize' Reading the error message: WARN TCPServer Error: Address already in use - bind(2) That means the port used by webrick is already used by another process, and is impossible to continue beyond that point. So: 1) install rubygems 2) look what other process/application is using port 3000 (rails default). 3) fix your dependencies issues (and correct version of them) for Rails and the gems you're using in your application. HTH, Luis Lavena