Ruby 2.0.0-p0 compatibility #642

Closed
Edwardzyc opened this Issue Feb 24, 2013 · 7 comments

Comments

Projects
None yet
5 participants
@Edwardzyc

Sinatra does not currently work for ruby 2.0

No error message given. It just does not start.
Could someone verify this?

@tbuehlmann

This comment has been minimized.

Show comment
Hide comment
@tbuehlmann

tbuehlmann Feb 24, 2013

Nope, works for me. Tried both, 1.3.4 and 6dc49e3.

Nope, works for me. Tried both, 1.3.4 and 6dc49e3.

@rkh

This comment has been minimized.

Show comment
Hide comment
@rkh

rkh Feb 25, 2013

Member

Cannot reproduce :(

Member

rkh commented Feb 25, 2013

Cannot reproduce :(

@tbuehlmann

This comment has been minimized.

Show comment
Hide comment
@tbuehlmann

tbuehlmann Feb 25, 2013

Same here.

Same here.

@sebastianwyder

This comment has been minimized.

Show comment
Hide comment
@sebastianwyder

sebastianwyder Feb 25, 2013

I have the same issue, if I run a Sinatra app under:

ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.1] (managed through rbenv)

Sinatra 1.3.4

I have the same issue, if I run a Sinatra app under:

ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.1] (managed through rbenv)

Sinatra 1.3.4

@rkh

This comment has been minimized.

Show comment
Hide comment
@rkh

rkh Feb 25, 2013

Member

You have an example app?

Member

rkh commented Feb 25, 2013

You have an example app?

@sebastianwyder

This comment has been minimized.

Show comment
Hide comment
@sebastianwyder

sebastianwyder Feb 25, 2013

Yeah, sure!

I have this very basic code just for testing purposes:

require "sinatra"

get "/" do
  "Test 123"
end

Yeah, sure!

I have this very basic code just for testing purposes:

require "sinatra"

get "/" do
  "Test 123"
end
@udzura

This comment has been minimized.

Show comment
Hide comment
@udzura

udzura Feb 25, 2013

Contributor

In rubygems 2.0.0, the file to override Kernel#require is core_ext/kernel_require.rb rather than custom_require.rb

Evidences:

require "sinatra"

get "/" do
  "Test 123"
end
p Sinatra::Application.app_file
$ ruby app.rb
"/Users/.../.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb"

So I think this will be fixed by editing CALLERS_TO_IGNORE .

Contributor

udzura commented Feb 25, 2013

In rubygems 2.0.0, the file to override Kernel#require is core_ext/kernel_require.rb rather than custom_require.rb

Evidences:

require "sinatra"

get "/" do
  "Test 123"
end
p Sinatra::Application.app_file
$ ruby app.rb
"/Users/.../.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb"

So I think this will be fixed by editing CALLERS_TO_IGNORE .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment