< Back

Identifying Ruby on Rails Sites

6

Posted by Lawrence Sinclair on 15 Aug 2009 at 06:40

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.  

6 comments
  1. Rob doan - Sep 03 2009

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

  2. Rob doan - Sep 03 2009

    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 - Aug 29 2009

    Nope, this is purely RoR, not Jruby.

  4. Rob doan - Aug 28 2009

    does this blog use Jruby on rails ?

  5. Quang Vi Huynh - Aug 22 2009

    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 - Aug 16 2009

    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.

Leave a comment