-
Notifications
You must be signed in to change notification settings - Fork 14
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
Need to reinstall the same theme each startup #40
Comments
Hello! :) What are your Pry and Pry Theme versions? Please, make sure that you have Pry |
I just updated pry-theme to Thanks. |
Please, show your |
My .pryrc is blank at the moment. Anyway, I tried using |
Okay... Could you try to delete the entire |
Yeah, I tried that too. It throws an error like this one:
So whenever I deleted the themes folder I have to create it manually. I also tried reinstalling both gems and using another shell. I'm starting to be short of more ideas. Also noticed that there were no default themes on this folder before I removed it. |
So you are using Ruby 2.1.1 and Pry Do you have any other Pry plugins installed? |
I'm using Ruby 2.1.2 and no, no more plugins installed. I tested with rvm ruby 2.1.1 and 2.0.0 and the same happens. |
Could you, please, copy-paste everything you tried in order to trigger this error? I just need to collect some more information about this quirk. I cannot reproduce it whatever I try. |
Well, not too much. I just installed ruby with rvm and then I installed both gems, pry and pry-theme. I have been trying to isolate the problem and this is what I found: I'm not loading the default themes, so lots of methods are not working, for example But for some reason and this is something I don't understand, when I close the pry session and I start it again, it's not loading the custom installed themes. I have to call the install method each time even If they are already in the local folder, and then it works. So I guess something happens with that method that then allows me to do |
The Pry Theme has had a similar issue recently, but it should be fixed: #39 |
Yeah, I know that. The problem is the only way pry-theme is loading themes to try is installing them first in the current session. That's why I think there's something in the install method that then allows me to try theme. Otherwise I get this error |
Could you, please, try Pry Theme from |
Yes, it works. It works with |
I just released |
No problem. Thank you too for your time. Cheers |
Until this gets fixed in Pry, you can get around it by adding the following to your ~/.pryrc # ensure hooks have been initialized prior to use (https://github.com/pry/pry/issues/1271)
Pry.config.hooks
# ensure pry-theme hook is added since it might have gotten "lost"
Pry.config.hooks.add_hook(
:when_started,
:pry_theme,
PryTheme::WhenStartedHook.new
) |
This is going to drive me crazy.
It throws me a blank space. If I try to install a theme, let's say ocean with:
I get the expected output:
Then, I'm able to use it with pry-theme try ocean.
The problem is whenever I exit from pry, and I enter again, the theme installed is not available:
I checked the .pry/themes folder and the ocean file is just there...
Your help is really appreciated.
The text was updated successfully, but these errors were encountered: