- How to Build a “Spy Camera” App for an Android Phone with Ruby and Sinatra
Published: September 2, 2010
Mike Leone
In Turn your Android Phone Into a Remote Spy Camera with Ruby in 15 Minutes, Mike Leone demonstrates how to use Ruby, Sinatra and Scripting Layer for Android (SL4A) to build and deploy a phone-hosted...
- Stealth Mode = Miss The Boat Mode
Published: August 27, 2010
Stealth Mode is the name of a start-up strategy where the founding team develops their product and business in secret. The tactic is based on the fear that, if their idea were to get out, other companies would...
- The right way to position against competition
Published: August 23, 2010
This is Part 4 of the series: 5 lessons from 150 startup pitches.
After seeing hundreds of startup pitches for this year's Capital Factory program, I can tell you that the two most common errors i...
- $528 Worth of Optimization Tools for $25
Published: August 23, 2010
Don’t know if you’ve seen this crazy deal at appSumo, but it’s essentially $528 in website analytics and optimization services for $25. It includes:
3 Months of Performable Starter Servi...
- One of the most wonderful flash games I have played in a long time
Published: August 22, 2010
submitted by Pation to gaming [link] [22 comments]
- Mongomatic: A New Ruby MongoDB Library Hits The Scene
Published: August 14, 2010
http://mongomatic.com/ (or on Ruby Inside)
Back in June, I did a comparison of Mongoid and MongoMapper, the two best known MongoDB libraries for Ruby. Now, Ben Myles has brought another to the fore: Mongomatic....
- How to turn carrots into bacon
Published: August 10, 2010
Via the BB Submitterator, reader kentbrew says, Here is an instructional Flickr set that shows you exactly how to turn the carrots you allowed to grow way beyond the point where they were edible by human beings...
- Google Apps OpenID with Rails and Devise
Published: August 9, 2010
By Fabricius of casperfabricius.com 2 days ago.
For the Ruby OpenID gem to play nicely with Google Apps, Googles own extension gem for this purpose must be loaded and required with require gap...
- Cow Clicker
Published: July 31, 2010
Ian Bogost was on the Colbert Report, if you didn't see it, you can tell because his Facebook portrait says so. Bogost has long been using gameplay for dry satire, the variety best tasted with a spot of mustard...
- Mind-blowing miniature sculptures carved into the graphite of a pencil. My favorite was the key on a ring.
Published: July 30, 2010
submitted by dishie to pics [link] [62 comments]
- See all shared items
- Plugin by C. Murray Consulting
Optimize your Rails environment on OS X
Getting your development environment setup just the way you like it takes some time. I’ve done it several times recently and this is the setup I feel most productive with.
The Basics
While I could talk you through the whole enchilada. Robby Russell over at Planet Argon has already done this. He’s done an excellent job of updating this guide over the years, and it’s usually the first place I go with a new installation. Someday, I’m sure I’ll have it memorized.
Ruby
While you can use the built-in ruby on Snow Leopard, I like to look forward to the day when we’re all 30% faster simply by deploying on Ruby 1.9. I use it in development for that very reason. However, most clients like to use Ruby Enterprise Edition because it’s so efficient and stable. Therefore, we need to switch between versions easily. Enter the Ruby Version Manager.
RVM not only keeps your system clean, but it allows for easy switching between versions of ruby.
For most cases I like to use the Ruby Enterprise Edition for it’s efficiency as my default ruby.
But I also like to have Ruby 1.9 around for the speed.
Gems
Make sure rubygems is up to date.
Edit your ~/.gemrc file to contain something like the following:
The most important reason to do this is for that second line. It stops gem from installing the ri and rdoc documentation which I never use anyway. This speeds up gem installation considerably.
Since we’re using RVM which keeps separate gem directories for each version of Ruby, you’ll need to install a few gems. (Even if you went through this from Robby’s instructions)
The most basic gems first:
and then the gems for the DB:
and some convience gems:
And some optional but useful gems:
Haml is a huge HTML productivity booster.
Compass (and Blueprint) is a huge CSS productivity booster.
Thin is a super-fast webserver for testing and such (doesn’t tail the log like mongrel or webrick).
Cheat is an awesome command-line tool. If I had a nickle for everytime i’ve typed:
I’d be rich.
Tweaks
Put a file in your home directory called .irbrc and have it include the following:
require 'irb/completion' # History #require 'irb/ext/save-history' #wirble does history IRB.conf[:SAVE_HISTORY] = 100 IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" # Wirble is a plugin to colorize your irb, it's installed from a gem (gem install -y wirble) require 'rubygems' begin # load wirble require 'wirble' # start wirble (with color) Wirble.init Wirble.colorize rescue LoadError => err warn "Couldn't load Wirble: #{err}" end ARGV.concat ["--readline", "--prompt-mode", "simple"] # autoindent of code while typing it IRB.conf[:AUTO_INDENT]=true # Log to STDOUT if in Rails && use HIRB if available if ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER') begin require 'hirb' Hirb.enable rescue LoadError => err warn "No Hirb: #{err}" end require 'logger' RAILS_DEFAULT_LOGGER = Logger.new(STDOUT) end # Easily print methods local to an object's class class Object def local_methods (methods - Object.instance_methods).sort end end # copy a string to the clipboard def pbcopy(string) `echo "#{string}" | pbcopy` string endThis turns on Hirb/Wirble for the ruby console as well as colorization, history and redirecting the logger to the console for Rails. This is very handy to see what Rails is doing with your database while you’re issuing commands in the console.
And lastly, some handy Bash aliases that really help speed up Rails work.
Appendix A: Use the OS X Dictionary for Rails Documentation.
Priit Haamer created a OS X dictionary file of the Rails API documentation which is oh so handy. I use it constantly as it’s faster that firing up a browser and works anywhere (with or without interweb access).
Conclusion
I hope this helps you get optimized with your Rails development. Please let me know if you have additions or need clarification on some of the items here.