

Loading development environment (Rails 4.1.1 ) public_instance_methods end ~/Source/rcfiles jweiss $ bin/rails c irb! # returns the instance methods on klass # that aren't already on Object def m ( klass ) klass. irbrc is also a great place to put hacky convenience methods that help you play with your objects: ~/.irbrc require "awesome_print" AwesomePrint.

irb!Īnd the next time you start a rails console, your objects will be printed more awesomely, automatically. Or, you can add the command to your ~/.irbrc file: ~/.irbrc require "awesome_print" AwesomePrint. You could type AwesomePrint.irb! at the beginning of each console session. When you run rails console, you might want to see all of your objects awesome_printed by default.

*rcĪnd they give commands like gem, irb, and rails a place to find your preferences. rc files live in your home directory: $ ls ~/. Lots of Ruby tools give you a simple way to store your preferences using. With a few small tweaks, you can have these commands remember your preferences, so you won’t have to. $ rails new best_app_ever -template =my_template And it’s infuriating when a computer doesn’t do what you thought you told it to do: $ rails new best_app_ever Sure, it’s only a little annoying to have to specify these preferences each time you run a command. Or you might want rails new to create projects that use rspec instead of minitest.

Maybe you always want to use awesome_print in your Rails consoles. I also had to reinstall all my other gems but those all went smoothly.Fast, Consistent Setup for Your Ruby and Rails ToolsĪfter you build a few Rails apps, you’ll begin to have some preferred ways of working with them. After I did that I was able to successfully run sudo gem install jekyll. I tried a number of things but what finally did it was making sure I had the latest version of Xcode installed. Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/http_parser.rb-0.6.0/gem_make.out Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/http_parser.rb-0.6.0 for inspection. Make: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/atform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/amework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18/ruby/config.h', needed by `ruby_http_parser.o'. System/Library/Frameworks/amework/Versions/2.3/usr/bin/ruby -r. This could take a while.ĮRROR: Failed to build gem native extension.Ĭurrent directory: /Library/Ruby/Gems/2.3.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser My first assumption was to try to just reinstall Jekyll but that didn’t work: sudo gem install jekyllīuilding native extensions. This post exists to hopefully provide help to other people when they run into this issue. So I was a little annoyed when I finally updated to Mojave (10.14) and received the following error: /usr/local/bin/jekyll: /System/Library/Frameworks/amework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory I’m not a huge fan of installing the latest and greatest version of anything until it’s had a chance to bite other people when it breaks.
