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

Warning: The plugin 'pry-theme' was not found! (gem found but could not be loaded) #11

Closed
danielbayerlein opened this issue Jul 13, 2012 · 25 comments
Labels

Comments

@danielbayerlein
Copy link
Contributor

Hi, i have a problems with your plugin in Rails Projects. Any idea?
My .pryrc.

$ pry
Warning: The plugin 'pry-theme' was not found! (gem found but could not be loaded)
no such file to load -- pry-theme
ruby-1.9.2-p290 (main):0 > 
@kyrylo
Copy link
Owner

kyrylo commented Jul 13, 2012

Hi. Do you use RVM or any other Ruby version manager?

@danielbayerlein
Copy link
Contributor Author

I use RVM.

@kyrylo
Copy link
Owner

kyrylo commented Jul 14, 2012

I don't use Rails, but maybe I can reproduce your problem. Just tell me what do you mean by "in Rails Projects"? How's that differ from regular gem installation?

@yorickpeterse
Copy link

@danielbayerlein Post the output of rvm env and gem env.

@banister
Copy link
Contributor

Did you add pry-theme to your Gemfile?

@danielbayerlein
Copy link
Contributor Author

@banister Nope. I need "pry-theme" in each project Gemfile?

@danielbayerlein
Copy link
Contributor Author

Same problem pry/pry#317?

@banister
Copy link
Contributor

@danielbayerlein bundler only allows you to use gems you've specified in the Gemfile, so you'd need it in every project's Gemfile if you want to use it.

Maybe pry-debundler could be used to get around this. @ConradIrwin may explain if there's anything you need to consider when using it.

@kyrylo
Copy link
Owner

kyrylo commented Jul 18, 2012

Closing this issue, since the OP lost his interest in the topic (reopen, if not).

@kyrylo kyrylo closed this as completed Jul 18, 2012
@danielbayerlein
Copy link
Contributor Author

Sorry, I was waiting for response from @ConradIrwin. I think rubygems/bundler#183 or pry-debundle would solve the problem. I will test it.

@kyrylo
Copy link
Owner

kyrylo commented Jul 18, 2012

No worries :) Just let us know about your results.

@kyrylo kyrylo reopened this Jul 18, 2012
@rking
Copy link

rking commented Jul 19, 2012

Hrm. That's weird. What gems do you have installed? Have you done anything odd on the pry-theme installation front?

@rking
Copy link

rking commented Jul 19, 2012

Oh. Cool guy rking sees original post but no replies. Ignore me, I'm a nerd.

@danielbayerlein
Copy link
Contributor Author

Hm, now I'm confused. I have the following added to my .pryrc:

begin
  require 'pry-theme'
  Pry.config.theme = "solarized"
rescue LoadError => e
  warn "[WARN] #{e}"
  puts "$ gem install pry-theme"
end

Now I start "pry".

$ pry
Warning: The plugin 'pry-theme' was not found! (gem found but could not be loaded)
no such file to load -- pry-theme
ruby-1.9.2-p290 (main):0 > pry-theme
Current theme: solarized

You will see a warning, but it works!?

The same with pry-debundle.

@kyrylo
Copy link
Owner

kyrylo commented Jul 20, 2012

Try not to require pry-theme (you don't have to, actually).

@kyrylo
Copy link
Owner

kyrylo commented Jul 20, 2012

Well, that won't help, I believe :)

@danielbayerlein
Copy link
Contributor Author

Without require 'pry-theme':

$ pry
Warning: The plugin 'pry-theme' was not found! (gem found but could not be loaded)
no such file to load -- pry-theme
ruby-1.9.2-p290 (main):0 > pry-theme
ruby-1.9.2-p290 (main):0 > exit
NameError: undefined local variable or method `theme' for main:Object
from (pry):1:in `__binding_impl__'

@banister
Copy link
Contributor

@danielbayerlein You get these errors when the gems are in your Gemfile ?

In the case of pry-debundle you still need it in your Gemfile (you just shouldn't need the other plugins in your Gemfile)

@danielbayerlein
Copy link
Contributor Author

@banister pry-theme is not in my Gemfile. I installed it via gem install pry-theme.
I tested pry-debundle with the Personal Installation.

@banister
Copy link
Contributor

@danielbayerlein Please explain more about your setup.

You are trying to use pry-theme without having it added to your Gemfile is that correct?

First please confirm that if you DO have it added to your Gemfile then it works, right?

Now, if you want to use pry-theme but NOT have it added to your Gemfile then you must use pry-debundle, but you still need pry-debundle added to your Gemfile.

@danielbayerlein
Copy link
Contributor Author

@banister I will test it at the latest on Friday.

@danielbayerlein
Copy link
Contributor Author

@banister

You are trying to use pry-theme without having it added to your Gemfile is that correct?

Exactly.

First please confirm that if you DO have it added to your Gemfile then it works, right?

Correct.

Now, if you want to use pry-theme but NOT have it added to your Gemfile then you must use pry-debundle, but you still need pry-debundle added to your Gemfile.

I tested pry-debundle and add the Gem to my Gemfile, but it doesn't work correct.

$ pry

ruby-1.9.2-p320 (main):0 > pry-theme
Current theme:

ruby-1.9.2-p320 (main):0 > pry-theme -l
.prytheme doesn't exist
TypeError: can't dup NilClass
from /Users/dbayerlein/.rvm/gems/ruby-1.9.2-p320/gems/pry-theme-0.1.0/lib/pry-theme/commands.rb:244:in `dup'

ruby-1.9.2-p320 (main):0 > pry-theme solarized
Using solarized theme

ruby-1.9.2-p320 (main):0 > pry-theme
Current theme: solarized

Works pry-debundle with the latest pry version?

@kyrylo
Copy link
Owner

kyrylo commented Jul 30, 2012

First of all, sorry for the delay. I've kept you waiting for a long time.

Next, I have good news. The bug (and this is a bug) has been fixed. The bug was in pry-debundle. I've sent a patch, so let's pray that @ConradIrwin will accept it (ConradIrwin/pry-debundle#4).

Thank you for your time and participation in discussion.

I'm waiting for your confirmation that pry-theme works for you from now on.

@danielbayerlein
Copy link
Contributor Author

@kyrylo Great! Your patch (ConradIrwin/pry-debundle#4) is merged, i will test it tomorrow.

@danielbayerlein
Copy link
Contributor Author

@kyrylo It works!
Thanks to all for the help.

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

No branches or pull requests

5 participants