LakTEK A Sri Lankan, A Rubyist and A Web Dude

Posted
31 October 2008 @ 7am

Tagged
, ,

Extended-Bort: My base Rails app

Bort is an awesome base Rails app, which allows you to get into real action without wasting your time on setting up the most common and boring stuff. It comes with RESTful Authentication, OpenID support, Capistrano Mutli-stage deployments and many other essential plugins, thus lifting good work load. I first got to use Bort when developing MyConf for Rails Rumble, where agility mattered to the maximum. Since, I felt it would be ideal to use Bort as the cookie cutter for my future Rails apps as well. However, I felt there needs to be several changes to make it more ideal for my workflow. Hence, I forked Bort and came up with Extended-Bort!

What are the changes?

  • Git Submodules are used to keep Rails and other plugins updated.
  • Included Rails 2.2.0 with tha app
  • Added annotate-models and make_resourceful plugins
  • Added Action Mailer initializer and SMTP settings for production mode
  • Uses admin email specified in settings.yml in exception notifier
  • Replaced rSpec story runner with new Cucumber Scenario Framework (webrat and cucumber plguins are included)
  • Replaced Prototype js with jQuery
  • Replaced asset_packager with bundle_fu for bundling assets
  • Changed Stylesheets by adding an initial stylesheet, application stylesheet and Hartija CSS print stylesheet

Want to Use?

If you feel like using Extended-Bort, follow these steps:

 git clone git://github.com/laktek/extended-bort.git
 git submodule init
 git submodule update

Edit the database.yml and the settings.yml files

 Rake db:migrate

change the session key in config/environment.rb and REST_AUTH_SITE_KEY in environments config (you can generate keys using rake:secret)

Have a brew and celebrate (from original Bort guys, but you can still do it ;) )


  • @Paulo This is one of the pitfalls with the use of Git submodules. I always try to keep the HEAD updated, to match with the latest releases of plugins.

    Can you try running this and see...
    cd vendor/plugins/cucumber
    git remote update
    git merge origin/master
  • Paulo
    For some reason, I can't get cucumber v0.1.10 to be download as submodule, instead, it insists on getting the v0.1.9 and if I just clone the same URL it will get latest. am I missing something?
  • $ git submodule update
    Initialized empty Git repository in c:/chirag/mindmap/extended-bort/extended-bort/vendor/plugins/aasm/.git/
    remote: Counting objects: 501, done.?[K
    remote: Compressing objects: 90% (189/209) Receiving objects: 61% (306/501)
    remote: Compressing objects: 100% (209/209), done.?[K81/501)
    remote: Total 501 (delta 329), reused 437 (delta 286)?[K
    Receiving objects: 100% (501/501), 62.43 KiB, done.
    Resolving deltas: 100% (329/329), done.
    error: Entry 'lib/aasm.rb' would be overwritten by merge. Cannot merge.
    Unable to checkout 'fee9487e0d5464fc328f1c9c91eb059fef75988e' in submodule path'vendor/plugins/aasm'
  • Jay,

    Basically moving your app and db/migrations folders to Bort base app, would be good to go.

    You could use git-svn to checkin and checkout from your existing SVN repo. You could learn more about it from here - http://utsl.gen.nz/talks/git-svn/intro.html

    My personal advise is switch to Git over SVN if you can afford. While Git has lot more flexibility than SVN, also it would reduce the hassle in keeping up with the edge of Rails and it's plugins.

    BTW, if you feel extended-bort is too complicated there is a update of orginial Bort for Rails 2.2 (http://github.com/fudgestudios/bort/tree/master).
  • Jay
    I'm new to the whole Rails thing, so please forgive the simplicity of this questions: What's the best practice to update my existing Rails 2.0 application to a Bort-based one? Should I just start out with a fresh Bort and move my models, views, and controller to it? That's probably the right answer. However, how do check the resulting stuff into my svn repository? It seems messy to checkin Bort, with all its depedency git repository stuff inside of it. Should I not be using subversion as my source control system? I don't know git. Can I somehow "sparsely checkout" my stuff atop a fresh git of Bort? And then maintain source control that way?
  • Scott O,

    I have fixed the link to annotate_model sub-module. It should work correctly now.
  • Scott O
    One must cd extended-bort before doing the two submodule steps.

    The second submodule step fails:

    $ git submodule update
    Initialized empty Git repository in /home/scott/projects/extended-bort/vendor/plugins/aasm/.git/
    remote: Counting objects: 493, done.
    remote: Compressing objects: 100% (201/201), done.
    remote: Total 493 (delta 323), reused 438 (delta 286)
    Receiving objects: 100% (493/493), 61.43 KiB, done.
    Resolving deltas: 100% (323/323), done.
    Submodule path 'vendor/plugins/aasm': checked out 'fee9487e0d5464fc328f1c9c91eb059fef75988e'
    Initialized empty Git repository in /home/scott/projects/extended-bort/vendor/plugins/annotate-models/.git/
    fatal: protocol error: expected sha/ref, got '
    *********'

    No matching repositories found.

    *********'
    fetch-pack from 'git://github.com/rotuka/annotate-models.git' failed.
    Clone of 'git://github.com/rotuka/annotate-models.git' into submodule path 'vendor/plugins/annotate-models' failed
blog comments powered by Disqus