Identifying Ruby on Rails Sites

Posted on: by Lawrence Sinclair

Can you tell if a site was implemented using Ruby on Rails? It is not always obvious. But there are clues that you can use. One of the East Agile developers shares the following advise on this topic.

Based on my experience about rails and web technologies, I have some rules to identify the technology behind a website:
- recognize by URL pattern
- view HTML source
- HTTP monitor by Firebug
- recognize it's not rails-based by understanding other platforms

Basically, I give you 2 simple approaches. To take advantage of these, you may need an understanding of some web technologies and you may need to install more tools. 

1. URL pattern:
   - rails-based website usually does not have those file extensions in URL: php, asp, aspx, do, jsp, ...
   - Rails supports RESTful URL build-in. So URL in rails usually in patterns:
      //new         --> new item page
      //        --> detail page of an item
      ///edit   --> edit an item with id
      /             --> list all items
      ///collection>
     ...
      may be *products*, *users*, *projects*
     Ex:
        /projects/1234/stories    --> all stories in project with id 1234
      /products/new             --> new production page
      ...
2. HTML code: 
    - open a page that has a form (eg: new products page, guestbook page, user registration page ...)
    - view HTML source: (menu View->Page Source in Firefox)
    - find HTML tag

(in FF: press command+F, type  - include less than symbol)
    If the website is developed with Rails technology, you may found those things after the tag:
    -  authenticity_token:
     
<input name="authenticity_token" type="hidden" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
    - field name convention: you may found: model[model_field_name] in the 'name' attribute of input tag:
    
    

An important thing to note: these steps do not prove if a website uses the Rails platform or not.  

top
6 responses to "Identifying Ruby on Rails Sites"
  1. Rob doan | 09/03/2009 at 05:49

    Sorry, I had a mistake. JWS = Joyent Web Server, right ? ^_^.

  2. Rob doan | 09/03/2009 at 05:18

    Oh, I see your server is JWS server so that I thought it was Jruby website. I didn't know Ruby on rails can be deloyed on JWS server .

  3. Quang | 08/29/2009 at 18:31

    Nope, this is purely RoR, not Jruby.

  4. Rob doan | 08/28/2009 at 11:33

    does this blog use Jruby on rails ?

  5. Quang Vi Huynh | 08/22/2009 at 07:38

    Yeah, most of the web programming languages support that now. However, Rails also has its own convention as described. Of course, you can make your site to be "similar" to that if you want, but beside the suffix and URL pattern, there are also other ways to recognize them.

  6. Trong Hiep Le | 08/16/2009 at 16:34

    About URL pattern; by using .htaccess we could probably make the URL pattern in PHP (I'm also pretty sure we could make it in ASP) just like one on my address bar right now.

top
Comments
Name (*)
Email
Website
Content (*)