Topic: Blank Pages and No "About your Framework"

Howdy,
  I've had ruby on rails configured correctly on this machine before, but after a short break from rails something seems to have gone wrong.

I can create an application fine.  I create a controller called test, and put in just one method

TestController < ApplicationController
  def index
    render_text "Hello World"
  end
end

The problem is, it can't render this controller at all.  It doesn't report an error, just a blank screen.  Same thing with any other controller name (that isn't there and should illicit an error message from WEBrick).  When I go to http://localhost:3000, I see the normal rails welcome screen.  However, clicking on "About your Application's Environment" does nothing except make a little yellow line appear below it.

Here's what WEBrick reports:

127.0.0.1 - - [08/Aug/2006:12:43:44 CDT] "GET /test HTTP/1.1" 200 0
- -> /test
[2006-08-08 12:43:44] ERROR MissingSourceFile: no such file to load -- irb
        /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'
        /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
        /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'
        /usr/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/breakpoint.rb:18
        /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in `load'
        /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:56:in `require_or_load'
        /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in `depend_on'
        /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in `require_dependency'
        /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:98:in `const_missing'
        /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing'
        /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in `const_missing'
        /usr/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/dispatcher.rb:75:in `reset_after_dispatch'
        /usr/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/dispatcher.rb:46:in `dispatch'
        /usr/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/webrick_server.rb:115:in `handle_dispatch'
        /usr/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/webrick_server.rb:81:in `service'
        /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
        /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
        /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
        /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
        /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
        /usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
        /usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
        /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
        /usr/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/webrick_server.rb:67:in `dispatch'
        /usr/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/commands/servers/webrick.rb:59
        /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
        /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'
        /usr/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/commands/server.rb:30
        /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
        /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'
        script/server:3

I found somebody on the Mac platform having this situation, but removing all the ruby_sess* files in the /tmp directory remedied his problem.  I tried it, to no avail.

BTW, I'm running ubuntu with ruby 1.8.4 and rails 1.1.4.  Thanks in advance!

Re: Blank Pages and No "About your Framework"

Try running "irb" in the command line. It should open an interactive prompt allowing you to type in ruby commands.

If that works, try running script/console in the root of your rails project:

./script/console

If both of those work then the problem might be in your dispatch file. Try opening up each "public/dispatch.*" file and replacing the first line with this:

#!/usr/bin/env ruby

Let us know if that solves your problem.

Last edited by ryanb (2006-08-08 14:10:01)

Railscasts - Free Ruby on Rails Screencasts