Can't get even a simple Rails app to run? blocked by "“ERROR TypeError: can't dup NilClass”

“ERROR TypeError: can’t dup NilClass” in a Rails 3 app? Any ideas -
I’m just hitting the home page and get this…it was working just

Gregs-MacBook-Pro:test3 greg$ rails console
Loading development environment (Rails 3.2.1)


Gregs-MacBook-Pro:test3 greg$ rails server
=> Booting WEBrick
=> Rails 3.2.1 application starting in development on
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-02-13 09:19:59] INFO WEBrick 1.3.1
[2012-02-13 09:19:59] INFO ruby 1.8.7 (2010-01-10) [universal-
[2012-02-13 09:19:59] INFO WEBrick::HTTPServer#start: pid=8435
[2012-02-13 09:20:27] ERROR TypeError: can’t dup NilClass
ruby/1.8/webrick/httprequest.rb:204:in dup' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/1.8/webrick/httprequest.rb:204:in meta_vars’
webrick.rb:34:in service' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/1.8/webrick/httpserver.rb:104:in service’
ruby/1.8/webrick/httpserver.rb:65:in run' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/1.8/webrick/server.rb:173:in start_thread’
ruby/1.8/webrick/server.rb:162:in start' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/1.8/webrick/server.rb:162:in start_thread’
ruby/1.8/webrick/server.rb:95:in start' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/1.8/webrick/server.rb:92:in each’
ruby/1.8/webrick/server.rb:92:in start' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/1.8/webrick/server.rb:23:in start’
ruby/1.8/webrick/server.rb:82:in start' /Library/Ruby/Gems/1.8/gems/rack-1.4.1/lib/rack/handler/ webrick.rb:13:in run’
265:in start' /Library/Ruby/Gems/1.8/gems/railties-3.2.1/lib/rails/commands/ server.rb:70:in start’
commands.rb:50:in tap' /Library/Ruby/Gems/1.8/gems/railties-3.2.1/lib/rails/ commands.rb:50 script/rails:6:in require’

Note that Ruby 1.8.7 p248 and p249 have marshaling bugs that crash
Rails 3.0. Ruby Enterprise Edition have these fixed since release
1.8.7-2010.02 though. On the 1.9 front, Ruby 1.9.1 is not usable
because it outright segfaults on Rails 3.0, so if you want to use
Rails 3 with 1.9.x jump on 1.9.2 for smooth sailing.

thanks - I’m deploying to and they are on ruby
1.8.7 at the moment was the reason. Any comments here? Sounds like
it might be better assuming I’ll have to do a custom ruby deployment
to the latest version on dreamhost perhaps? Their reply when I asked
the question about versions was:

I’m happy to assist you. Most of our devs use version of Ruby that we
officially support which is 1.8.7. You can install any version of
Ruby that you like using the RVM method shown on the page listed

RVM will require that you upgrade to a VPS or dedicated hosting
package. If you have any other questions let me know and I will assist
you further.

arrr - I noted I had “https” not “http” in the url I was calling.
That is I was using “https://localhost:3000”. Should this have had
such an effect on rails?

oh dear,

Just when to latest ruby 1.9.3 using rvm, but I’m still getting same
error - basically can’t use rails at all at the moment:

Gregs-MacBook-Pro:test_rvm193_1 greg$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.3.0]
Gregs-MacBook-Pro:test_rvm193_1 greg$ which ruby
Gregs-MacBook-Pro:test_rvm193_1 greg$ rails -v
Rails 3.2.1
Gregs-MacBook-Pro:test_rvm193_1 greg$

Gregs-MacBook-Pro:test_rvm193_1 greg$ rails server
=> Booting WEBrick
=> Rails 3.2.1 application starting in development on
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-02-13 11:30:11] INFO WEBrick 1.3.1
[2012-02-13 11:30:11] INFO ruby 1.9.3 (2011-10-30) [x86_64-
[2012-02-13 11:30:11] INFO WEBrick::HTTPServer#start: pid=36488
[2012-02-13 11:30:32] ERROR TypeError: can’t dup NilClass
httprequest.rb:273:in dup' /Users/greg/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/ httprequest.rb:273:in meta_vars’
handler/webrick.rb:34:in service' /Users/greg/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/ httpserver.rb:138:in service’
httpserver.rb:94:in run' /Users/greg/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/ server.rb:191:in block in start_thread’
^C[2012-02-13 11:31:04] INFO going to shutdown …

Any ideas?