Closed danielbayerlein closed 12 years ago
Hi. Do you use RVM or any other Ruby version manager?
I use RVM.
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?
@danielbayerlein Post the output of rvm env
and gem env
.
Did you add pry-theme to your Gemfile?
@banister Nope. I need "pry-theme" in each project Gemfile?
Same problem pry/pry#317?
@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.
Closing this issue, since the OP lost his interest in the topic (reopen, if not).
Sorry, I was waiting for response from @ConradIrwin. I think carlhuda/bundler#183 or pry-debundle would solve the problem. I will test it.
No worries :) Just let us know about your results.
Hrm. That's weird. What gems do you have installed? Have you done anything odd on the pry-theme installation front?
Oh. Cool guy rking sees original post but no replies. Ignore me, I'm a nerd.
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.
Try not to require pry-theme
(you don't have to, actually).
Well, that won't help, I believe :)
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__'
@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
)
@banister pry-theme
is not in my Gemfile. I installed it via gem install pry-theme
.
I tested pry-debundle
with the Personal Installation.
@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
.
@banister I will test it at the latest on Friday.
@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?
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 (https://github.com/ConradIrwin/pry-debundle/pull/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.
@kyrylo Great! Your patch (ConradIrwin/pry-debundle#4) is merged, i will test it tomorrow.
@kyrylo It works! Thanks to all for the help.
Hi, i have a problems with your plugin in Rails Projects. Any idea? My .pryrc.