ERROR Errno::ENOENT: No such file or directory - <internal:prelude>

120 views
Skip to first unread message

ihadanickle

unread,
Apr 1, 2009, 5:13:43 AM4/1/09
to sinatrarb
Hi there,

Any chance anyone knows what this error is about?

#sinatra.rb
require 'rubygems'
require 'sinatra'
get '/' do
'Hello World!'
end


$ ruby -v
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-darwin9]

$ ruby sinatra.rb
== Sinatra/0.9.1.1 has taken the stage on 4567 for development with
backup from WEBrick
[2009-04-01 18:17:06] INFO WEBrick 1.3.1
[2009-04-01 18:17:06] INFO ruby 1.9.1 (2009-01-30) [i386-darwin9]
[2009-04-01 18:17:06] INFO WEBrick::HTTPServer#start: pid=76583
port=4567
[2009-04-01 18:17:32] ERROR Errno::ENOENT: No such file or directory -
<internal:prelude>
/opt/local/lib/ruby/gems/1.9.1/gems/sinatra-0.9.1.1/lib/sinatra/
base.rb:610:in `read'
/opt/local/lib/ruby/gems/1.9.1/gems/sinatra-0.9.1.1/lib/sinatra/
base.rb:610:in `use_in_file_templates!'
(__DELEGATE__):2:in `use_in_file_templates!'
/opt/local/lib/ruby/gems/1.9.1/gems/sinatra-0.9.1.1/lib/sinatra.rb:
8:in `<top (required)>'
/opt/local/lib/ruby/gems/1.9.1/gems/sinatra-0.9.1.1/lib/sinatra/
base.rb:808:in `load'
/opt/local/lib/ruby/gems/1.9.1/gems/sinatra-0.9.1.1/lib/sinatra/
base.rb:808:in `reload!'
/opt/local/lib/ruby/gems/1.9.1/gems/sinatra-0.9.1.1/lib/sinatra/
base.rb:795:in `block in call'
<internal:prelude>:8:in `synchronize'
/opt/local/lib/ruby/gems/1.9.1/gems/sinatra-0.9.1.1/lib/sinatra/
base.rb:851:in `synchronize'
/opt/local/lib/ruby/gems/1.9.1/gems/sinatra-0.9.1.1/lib/sinatra/
base.rb:794:in `call'
/opt/local/lib/ruby/gems/1.9.1/gems/rack-0.9.1/lib/rack/handler/
webrick.rb:40:in `service'
/opt/local/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/opt/local/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/opt/local/lib/ruby/1.9.1/webrick/server.rb:183:in `block in
start_thread'


oh and i tried thin as welll

$ ruby sinatra.rb
== Sinatra/0.9.1.1 has taken the stage on 4567 for development with
backup from Thin
>> Thin web server (v1.0.0 codename That's What She Said)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop
!! Unexpected error while processing request: No such file or
directory - <internal:prelude>
!! Unexpected error while processing request: No such file or
directory - <internal:prelude>
!! Unexpected error while processing request: No such file or
directory - <internal:prelude>
!! Unexpected error while processing request: No such file or
directory - <internal:prelude>
!! Unexpected error while processing request: No such file or
directory - <internal:prelude>

candlerb

unread,
Apr 1, 2009, 6:23:37 AM4/1/09
to sinatrarb
Calling your own file sinatra.rb, when it does 'require "sinatra"', is
probably not a wise move.

Having said that, I don't know whether this is your problem, since I
don't use ruby 1.9.

Rename your application, and if it still doesn't work, try it with
1.8. Many things are still broken in 1.9.

ihadanickle

unread,
Apr 1, 2009, 6:30:29 AM4/1/09
to sinatrarb
oh wow, yeh that was the problem.
cheers!
Reply all
Reply to author
Forward
0 new messages