How to Find the Directory Locations Your XCode App Uses
You can add this snippet to your application, say for instance in your `viewDidLoad` function, that will print to the XCode console, the location of your app while it's being developed. // prints the location of asset my-added-file.txt that you've ad...
Written by Sean Behan on 06/06/2018
Ruby Reload! Method in Non Rails IRB Sessions
I love the Rails reload! function when in the console. I need it in Irb. To get it back this is what I did. If you don't already have an .irbrc file in your home directory, just create it. vim ~/.irbrc or textmate if you prefer mate ~/.irbrc Add this...
Written by Sean Behan on 06/17/2012
Ruby Enterprise Edition and Passenger ./script/console production fails and instead returns Loading production environment (Rails 2.3.5) Rails requires RubyGems >= 1.3.2. Please install RubyGems and try again: http://rubygems.rubyforge.org
After installing Ruby Enterprise Edition, REE, and Passenger on Ubuntu you may see this error message when you run script/console for the first time ./script/console production # => Loading production environment (Rails 2.3.5) Rails requires RubyGems >=...
Written by Sean Behan on 06/17/2012
Output Logger and SQL to the Rails Console in Development Mode
If you want to take a look at the SQL being generated by active record while your using the console, you can either type this into the console when it loads ActiveRecord::Base.logger = Logger.new(STDOUT) Or you can add it to your environment so that it'...
Written by Sean Behan on 06/17/2012
Starting the Rails Console in Production Mode
To specify which mode you'd like the rails console to boot up in, just provide the string without any flags. ./script/console production ./script/console test ./script/console development If you're on windows, remember the backslash "\" rather than for...
Written by Sean Behan on 06/17/2012