Noob Install Failed 0.0.0.0:3000

Happy Holidays,

I am new to RoR and have just run through the install, which well
seemed to be vaquely documented as some ‘Do this’ type of thing on
the http://rubyonrails.org/download page.

download gem
setup.rb

gem install rails

rails path/to/your/new/application
cd path/to/your/new/application
ruby script/server

and then ( drumroll ) …

Follow the instructions on http://localhost:3000.

Unable to connect to Server …

Advise Please.

Has this possibly got something to do with the fact that I am on
Windows XP and the install script is choking because of white space in
the path, like in “Program Files”?


I note two oddities which I’m sure are related to the failure …

Rails 2.3.3 application starting on http://0.0.0.0:3000
c:/program files/ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:31:in `g
em_original_require’: C:/Program Files/Apache Software Foundation/
Apache2.2/htdo
cs/rails/config/environment.rb:4: syntax error, unexpected
‘<’ (SyntaxError)
<%= '# ’ if freeze %>RAILS_GEM_VERSION = ‘<%= Rails::VERSION::STRING
%>’ unless
defined? RAILS_GEM_VERSION


Notice that the IP is 0.0.0.0 instead of 127.0.0.1

also, the Syntax Error


C:\Downloads\Ruby on Rails\rubygems-1.3.5\rubygems-1.3.5>setup.rb
RubyGems 1.3.5 installed

=== 1.3.5 / 2009-07-21

Bug fixes:

  • Fix use of prerelease gems.
  • Gem.bin_path no longer escapes path with spaces. Bug #25935 and
    #26458.

Deprecation Notices:

  • Bulk index update is no longer supported (the code currently
    remains, but not
    the tests)
  • Gem::manage_gems was removed in 1.3.3.
  • Time::today was removed in 1.3.3.

RubyGems installed the following executables:
c:/program files/ruby/bin/gem

C:\Downloads\Ruby on Rails\rubygems-1.3.5\rubygems-1.3.5>
C:\Downloads\Ruby on Rails\rubygems-1.3.5\rubygems-1.3.5>gem install
rails
Successfully installed rake-0.8.7
Successfully installed activesupport-2.3.5
Successfully installed activerecord-2.3.5
Successfully installed rack-1.0.1
Successfully installed actionpack-2.3.5
Successfully installed actionmailer-2.3.5
Successfully installed activeresource-2.3.5
Successfully installed rails-2.3.5
8 gems installed
Installing ri documentation for rake-0.8.7…
Installing ri documentation for activesupport-2.3.5…
Installing ri documentation for activerecord-2.3.5…
Installing ri documentation for rack-1.0.1…
Installing ri documentation for actionpack-2.3.5…
Installing ri documentation for actionmailer-2.3.5…
Installing ri documentation for activeresource-2.3.5…
Installing ri documentation for rails-2.3.5…
Installing RDoc documentation for rake-0.8.7…
Installing RDoc documentation for activesupport-2.3.5…
Installing RDoc documentation for activerecord-2.3.5…
Installing RDoc documentation for rack-1.0.1…
Installing RDoc documentation for actionpack-2.3.5…
Installing RDoc documentation for actionmailer-2.3.5…
Installing RDoc documentation for activeresource-2.3.5…
Installing RDoc documentation for rails-2.3.5…

C:\Downloads\Ruby on Rails\rubygems-1.3.5\rubygems-1.3.5>
C:\Downloads\Ruby on Rails\rubygems-1.3.5\rubygems-1.3.5>rails c:
\program files
apache software foundation\apache2.2\htdocs\rails\newapp
create
create app/controllers
create app/helpers
create app/models
create app/views/layouts
create config/environments
create config/initializers
create config/locales
create db
create doc
create lib
create lib/tasks
create log
create public/images
create public/javascripts
create public/stylesheets
create script/performance
create test/fixtures
create test/functional
create test/integration
create test/performance
create test/unit
create vendor
create vendor/plugins
create tmp/sessions
create tmp/sockets
create tmp/cache
create tmp/pids
create Rakefile
create README
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create config/database.yml
create config/routes.rb
create config/locales/en.yml
create db/seeds.rb
create config/initializers/backtrace_silencers.rb
create config/initializers/inflections.rb
create config/initializers/mime_types.rb
create config/initializers/new_rails_defaults.rb
create config/initializers/session_store.rb
create config/environment.rb
create config/boot.rb
create config/environments/production.rb
create config/environments/development.rb
create config/environments/test.rb
create script/about
create script/console
create script/dbconsole
create script/destroy
create script/generate
create script/runner
create script/server
create script/plugin
create script/performance/benchmarker
create script/performance/profiler
create test/test_helper.rb
create test/performance/browsing_test.rb
create public/404.html
create public/422.html
create public/500.html
create public/index.html
create public/favicon.ico
create public/robots.txt
create public/images/rails.png
create public/javascripts/prototype.js
create public/javascripts/effects.js
create public/javascripts/dragdrop.js
create public/javascripts/controls.js
create public/javascripts/application.js
create doc/README_FOR_APP
create log/server.log
create log/production.log
create log/development.log
create log/test.log

C:\Downloads\Ruby on Rails\rubygems-1.3.5\rubygems-1.3.5>cd c:\program
files\apa
che*\apache*\htdocs\rails

C:\Program Files\Apache Software Foundation\Apache2.2\htdocs
\rails>ruby script/s
erver
=> Booting WEBrick
=> Rails 2.3.3 application starting on http://0.0.0.0:3000
c:/program files/ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:31:in g em_original_require': C:/Program Files/Apache Software Foundation/ Apache2.2/htdo cs/rails/config/environment.rb:4: syntax error, unexpected '<' (SyntaxError) <%= '# ' if freeze %>RAILS_GEM_VERSION = '<%= Rails::VERSION::STRING %>' unless defined? RAILS_GEM_VERSION ^ from c:/program files/ruby/lib/ruby/site_ruby/1.8/rubygems/ custom_requir e.rb:31:inrequire’
from C:/Program Files/Apache Software Foundation/Apache2.2/
htdocs/rails/
vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in
require' from C:/Program Files/Apache Software Foundation/Apache2.2/ htdocs/rails/ vendor/rails/activesupport/lib/active_support/dependencies.rb:521:innew_consta
nts_in’
from C:/Program Files/Apache Software Foundation/Apache2.2/
htdocs/rails/
vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in
require' from C:/Program Files/Apache Software Foundation/Apache2.2/ htdocs/rails/ vendor/rails/railties/lib/commands/server.rb:84 from c:/program files/ruby/lib/ruby/site_ruby/1.8/rubygems/ custom_requir e.rb:31:ingem_original_require’
from c:/program files/ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_requir
e.rb:31:in `require’
from script/server:3

C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\rails>

Thanks for your help in advance.

bearstate

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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

On Dec 20, 6:09 pm, BearState [email protected] wrote:

<%= '# ’ if freeze %>RAILS_GEM_VERSION = ‘<%= Rails::VERSION::STRING
%>’ unless
defined? RAILS_GEM_VERSION


Notice that the IP is 0.0.0.0 instead of 127.0.0.1

The ip address is not a problem - 0.0.0.0 is shorthand for ‘listening
on all interfaces’. The syntax error is really weird though. When you
do rails app_name it creates a bunch of files for you. Some of them
are just copied verbatim, others are templates with some bits of
information filled in on the fly. config/environment.rb is one such
file. Hard to be sure without seeing the whole file but from the
excerpt of the file contained in the error it looks like the template
for environment.rb was just copied verbatim, without being evaluated.
I suppose it’s possible that funny path names were part of the reason

  • easiest way to find out is to try again in a different location.

Fred

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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

Hello again!

I call it tautological learning … you stick out your finger, get
burned and don’t do that again, else, you don’t get burned and you
internalize the response with the option for modification in the
future.

Yep, the white space in the path was the culprit. I wanted to
stuff all web stuff in my Apache htdocs dir to make things easy to
back up. Apparently, rails was not willing to accommodate.

The install worked OK if I simply chose a path directly off c:

Not what I wanted to do, but … OK, success is a better option than
failure.

BearState

On Dec 20, 10:09Â am, BearState [email protected] wrote:

Advise Please.
c:/program files/ruby/lib/ruby/site_ruby/1.8/rubygems/

 the tests)
rails
Installing ri documentation for activesupport-2.3.5…
Installing RDoc documentation for actionpack-2.3.5…
   create  app/helpers
   create  public/images
   create  tmp/sessions
   create  db/seeds.rb
   create  script/about
   create  test/performance/browsing_test.rb
   create  public/javascripts/controls.js

‘<’ (SyntaxError)
    from C:/Program Files/Apache Software Foundation/Apache2.2/
vendor/rails/railties/lib/commands/server.rb:84
Thanks for your help in advance.

bearstate

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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

Quotes are good for wrapping spaces

Blog: http://random8.zenunit.com/
Twitter: http://twitter.com/random8r
Learn: http://sensei.zenunit.com/
New video up now at http://sensei.zenunit.com/ real fastcgi rails
deploy process! Check it out now!

On 21/12/2009, at 5:37 AM, BearState [email protected] wrote:

back up. Apparently, rails was not willing to accommodate.

Happy Holidays,
rails path/to/your/new/application
cd path/to/your/new/application
ruby script/server

and then ( drumroll ) …

Follow the instructions onhttp://localhost:3000.

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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs