Rails / Ruby
Get flash to fully experience Pearltrees
In this article, we will use restful_authentication to add a user system to a simple Rails application. This is great for those first starting out and need step-by-step directions for using this amazing plugin. At the end of the article, visitors will be able to create an account, reset their password, login, logout, and validate email addresses. The Basics This portion of the tutorial is very basic.
A report on Ruby usage among New Relic Customers We saw recently that our friend Peter Cooper has created a nice tutorial on moving to Ruby 1.9 called The Ruby 1.9 Walkthrough: How to Go From Ruby 1.8.7 to 1.9.2 and 1.9.3. We started to wonder how many of our customers are on 1.8 versus 1.9, then quickly (and embarrassingly) realized we hadn’t published a Ruby on Rails State of the Stack Report in quite some time. Read the (overdue) report below. A little background
Ryan Bates recently published a couple of great screencasts on how to integrate Omniauth to Devise using Rails 3 and allow Facebook, Twitter, etc. authentications. Yesterday I had to expand this solution to a full Facebook integration, where I wanted to post messages on users Wall, fetch email and other extra information. Moreover, my goal was to reuse established Omniauth authentication with Devise. Initially, I wanted to go with Facebooker , however it appeared it does not support Rails 3.
Since version 1.2, Devise supports integration with OmniAuth . This wiki page will cover the basics to have this integration working using an OAuth provider as example. Since version 1.5, Devise supports OmniAuth 1.0 forward which will be the version covered by this tutorial. Facebook example The first step then is to add OmniAuth OAuth to our application, this can be done in our Gemfile:
I hate signing up for websites. I’ve already signed up for so many, using different usernames, that going back to one of them and trying to remember my credentials is sometimes impossible. These days, most sites have begun offering alternative ways to sign up, by allowing you to use your Facebook, Twitter or even your Google account. Creating such an integration sometimes feels like a long and arduous task. But fear not, Omniauth is here to help.
digg If you already are a Rails programmer, or if you are just beginning to learn about rails in your computer programming classes , i’m pretty sure that you have already been dazzled by the things that Rails can do for you. However, all this convenience comes at a cost. That cost comes for the fact that you need to know how to work with the internal Rails conventions and traps. Since i’ve been programming in Rails for quite some months now, i would like to give you what i think are some very useful tips that will make your Rails life easier.
I’m not going to cover how to actually code an entire social network site in rails as all social network sites vary in their functionality (and it’ll take too long). I will cover plugins and other things you might find useful though. Quick Start
Ruby on Rails is a powerful web framework that helps creating web applications easier, faster & writing an organized code. There are lots of websites that use it including popular ones like Twitter, Basecamp, AboutUs & many more. Also, Ruby on Rails powers some amazing open source web applications which you may want to use directly or improve further. Here is a well-categorized 23 open source Ruby on Rails applications : (Note: There are few Merb apps. in the list too which we believe is ok considering Rails & Merb are getting into the same package with Rails 3 .)
SUMMARY: I spent two years trying to make Rails do something it wasn’t meant to do, then realized my old abandoned language (PHP, in my case) would do just fine if approached with my new Rails-gained wisdom . Back in January 2005, I announced on the O’Reilly blog that I was going to completely scrap over 100,000 lines of messy PHP code in my existing CD Baby (cdbaby.com) website, and rewrite the entire thing in Rails, from scratch. I hired one of the best Rails programmers in the world (Jeremy Kemper aka bitsweat), and we set off on this huge task with intensity.
1 Performance Test Cases Rails performance tests are a special type of integration tests, designed for benchmarking and profiling the test code. With performance tests, you can determine where your application’s memory or speed problems are coming from, and get a more in-depth picture of those problems. In a freshly generated Rails application, test/performance/browsing_test.rb contains an example of a performance test:
Automated Testing Suites in Ruby on Rails Make no mistake: web applications are not documents, they are software. While a simple brochure-style site may contain nothing more than static HTML pages, your typical Ruby on Rails application is something more.
Here is what I’ve done to create this application: Use the ‘rails new’ command to create a rails application Set up the Gemfile Configure the Database Install Cucumber Install Rspec Install Devise Install CanCan Install jQuery Configure Devise Download (HD) 84.2 MB Download (iPod & iPhone) 47.4 MB Tagged as: bundler , cancan , cucumber , database , devise , gemfile , generators , jquery , mysql , rails 3 , rspec , ruby , Ruby on Rails , setup <p style="text-align:right;color:#A8A8A8"></p>