Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pry on 1.9.2-p290 gives #<LoadError: no such file to load -- coderay/tokens_proxy> #280

Closed
tvon opened this issue Sep 21, 2011 · 10 comments
Closed

Comments

@tvon
Copy link

tvon commented Sep 21, 2011

Works fine with 1.9.2-p180, but on updating to 1.9.2-p290 I get an error when attempting to output anything:

± pry -r ./config/environment
pry(main)> User.all
(pry) output error: #<LoadError: no such file to load -- coderay/tokens_proxy>

This is on Snow Leopard.

@banister
Copy link
Member

Hi, can you reproduce this bug outside of rails?

@tvon
Copy link
Author

tvon commented Sep 21, 2011

Hmm, bad report on my part, it actually works in another 1.9.2-p290 rails project.

What's odd is that in the "broken" project it works fine using 1.9.2-p180.

It does work with "--no-color", which makes sense given the error, suggestions on how to track down the core issue?

@banister
Copy link
Member

@tvon, at a guess it sounds like a CodeRay bug. It seems that CodeRay has finally got to version 1.0 (which was released yesterday) and there may still be some issues with it, could you try also filing the issue on https://github.com/rubychan/coderay/issues and see if he has any immediate ideas.

@tvon
Copy link
Author

tvon commented Sep 21, 2011

Aight, thanks.

Quick edit to confirm, the working gemset has code ray 0.9.8, the broken one has 1.0

@tvon tvon closed this as completed Sep 21, 2011
@apneadiving
Copy link

same problem here using ree and pry 0.9.6

@banister banister reopened this Sep 26, 2011
@banister
Copy link
Member

@apneadiving, i filed an issue on CodeRay and i'll wait to see if he can push a fix in the next few hours, if he cant, i'll push a new gem downgrading the dependency to coderay 0.9.*

@korny
Copy link

korny commented Sep 26, 2011

Interesting. Maybe some problem with Rails?

CodeRay is using autoload: https://github.com/rubychan/coderay/blob/master/lib/coderay.rb#L137

Can you please check:

  • whether there is a lib/coderay/tokens_proxy.rb file
  • whether it was not loaded before you highlight anything, with $".grep(/tokens_proxy/) or something
  • whether it is loaded after you evaluate CodeRay::TokensProxy

@korny
Copy link

korny commented Sep 26, 2011

btw: I think it's a bad idea to define your dependencies with ">=".

@banister
Copy link
Member

@korny, @apneadiving,

I pushed a 0.9.6.2 gem that downgraded the dependency on CodeRay to ~>0.9.8

Let me know if this works for you

@korny
Copy link

korny commented Sep 27, 2011

I hope to get a fix/workaround for this ready in the next days. It seems Rails doesn't like libraries which use autoload.

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

No branches or pull requests

4 participants