Skip to content

Instantly share code, notes, and snippets.

@bevanhunt
Created May 28, 2012 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bevanhunt/2818439 to your computer and use it in GitHub Desktop.
Save bevanhunt/2818439 to your computer and use it in GitHub Desktop.
Rails Session at Vancouver Polyglot 2012 Recap

The Rails Session at Polyglot was group Q&A:

Q: What are the most popular and hot testing tools?
A:

Q: What about background processes?
A: [IronWorker] (http://www.iron.io/) (better and cheaper than Heroku worker dynos) - use the [CLI] (http://blog.iron.io/2012/05/new-ironworker-command-line-interface.html) for deploy

Q: What about cloud databases?
A: [MongoHQ] (https://mongohq.com/) (nice control panel), [MongoLab] (https://mongolab.com/), or [Heroku Postgres] (https://postgres.heroku.com/)

Q: What is Cucumber and should I use it?
A: [Cucumber] (https://github.com/cucumber/cucumber-rails) is for testing user stories using the [Gherkin Syntax with Step Definitions] (https://github.com/cucumber/cucumber/wiki/Gherkin). The group opinion was to favor RSpec.

Q: What are my choices for CI?
A: For open source there is [Travis CI] (http://travis-ci.org/) (the GitHub for CI) and for closed source there are many - [Tddium] (https://www.tddium.com/), [Teamcity] (http://www.jetbrains.com/teamcity/) , [Jenkins] (http://jenkins-ci.org/), [CIJoe] (https://github.com/defunkt/cijoe), and etc. [Tddium] (https://www.tddium.com/) is a cloud service CI.

Q: How do I speed up Selenium testing?
A: Use cloud services - [SauceLabs] (http://saucelabs.com/) or [BrowserStack] (http://www.browserstack.com/)

Q: How can I measure my app's performance?
A: [NewRelic] (http://newrelic.com) and [ActiveSupport::Notifications] (http://confreaks.com/videos/892-railsconf2012-digging-deep-with-activesupport-notifications)

Q: People say "Rails can't scale!" what should I tell them?
A: Tell them that scaling Rails is easy, flexible, and affordable by using [Heroku] (http://www.heroku.com). A Heroku Rails app (using only one web dyno) can get about [800 requests per second] (http://michaelvanrooijen.com/articles/2011/06/01-more-concurrency-on-a-single-heroku-dyno-with-the-new-celadon-cedar-stack/) (by using 3 Unicorn workers) ([Setup Info] (http://blog.railsonfire.com/2012/05/06/Unicorn-on-Heroku.html)) for [free] (https://devcenter.heroku.com/articles/billing-changes) that is scaled by using a [graphical slider] (http://www.heroku.com/pricing/), [API] (https://devcenter.heroku.com/articles/scaling), or [CLI] (https://devcenter.heroku.com/articles/scaling). To prevent [dyno idling] (https://devcenter.heroku.com/articles/dyno-idling) for free apps use [NewRelic or another monitoring tool] (http://stackoverflow.com/questions/5480337/easy-way-to-prevent-heroku-idling). Additional scaling gains can be made with Cloudfront and Caching. Heroku Rails apps have access to great [Addons] (https://addons.heroku.com/). Here is a Heroku [success story] (http://success.heroku.com/hipster).

Q: What is the best way to use Rake on Windows?
A: [Albacore] (https://github.com/derickbailey/Albacore)

Q: What text-editors and IDEs are good for Ruby/Rails?
A: [Rubymine] (http://www.jetbrains.com/ruby/) (Win,Linux,Mac), [Sublime Text 2] (http://www.sublimetext.com/2) (Win,Linux,Mac), Vim (Win,Linux,Mac), [Chocolat] (http://chocolatapp.com/) (Mac), [Textmate] (http://macromates.com/) (Mac), and etc.

Q: How do I setup Authentication & Role Authorization in a Rails app?
A: Install/Setup authentication using the built-in system or a gem ([Sorcery] (https://github.com/NoamB/sorcery), [Devise] (https://github.com/plataformatec/devise), etc.) then use [Cancan] (https://github.com/ryanb/cancan) for authorization. Cancan is role neutral - the recommended solutions are to use one role per user (boolean admin field in the user model with a model admin? method) or has_many roles per user (relational model based).

Q: Where can I get a walkthrough on Mountable Engines?
A: [Railscasts #277] (http://railscasts.com/episodes/277-mountable-engines)

Q: Why not Node.js?
A: Async everything is a downside. Rails is a full web framework not a micro-framework (Express/Sinatra). Rails takes care of many problems under-the-hood (e.g. CSRF) using "Convention over Configuration". Rails is a mature HTML app framework. Rails also makes a great JSON API (latest Railscasts go into detail).

Here is my Twitter: [@bevanhunt] (http://www.twitter.com/bevanhunt)

A list of Rails Resources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment