Can't use IRB and can't install rails

Hello. Ever since I installed the requirements in the beginning of prep I noticed I’m unable to use IRB. It continues to say
-bash: pry: command not found’

Can someone help me figuring out what is wrong? I also notice my rails was removed from the system including rvm. Is it not required? Whenever I try to install rails I continue to get

‘gem install rails
ERROR: While executing gem … (Errno::EACCES)
Permission denied @ rb_sysopen - /usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.7.2/.autotest’

Thanks for all the help and explanation.

looks like pry is not installed.

you can confirm with: pry -v

if it’s not installed try: gem install pry

irb is not recommend, because pry is a lot more powerful in terms of debugging, testing, etc…

but if you need to use irb in the interim, you can remove the alias that reassigns the command ‘irb’ to ‘pry’, which is part of the dot-files configuration:

open up ‘~/.aliases’ , which should be in your home directory with: atom ~/.aliases

you’ll see something like this:

alias irb="pry"

just comment that line out with ‘#’ and save.

resource your .bash_profile with: source ~/.bash_profile

and you should be good to go.

1 Like

YES! That was the problem I was having. Thank you for replying to my concern John.

I also appreciate teaching me how I could go back to using IRB if I ever considered it. Although, I’ll be sticking with pry, mostly due to it being a a/A requirement but also because as you mentioned it is very powerful in helping me in future projects.

Thank you again for your help :slight_smile:

Right on! Happy to help!

Also note that there’s nothing wrong with irb. pry is recommended over irb because pry is basically irb with a lot of awesome features built on top. I imagine we’ll be using it extensively during the course, so now is the time to learn how to use it.

1 Like