

Show HN: Ruby on Rails Bootstraping - HugoDias
https://github.com/hugodias/railStrap

======
phsr
This would be better if it used a template file instead of forking a whole
repo.

[http://guides.rubyonrails.org/rails_application_templates.ht...](http://guides.rubyonrails.org/rails_application_templates.html)

The one we use at my work is here: <https://github.com/dockyard/sail_plan>

~~~
billturner
Yes, indeed. The RailsApps project resource has kept up to date with the
recent Rails updates, and has many different templates based on testing, DB,
etc: <http://railsapps.github.com/>

And like another commenter noted, Rails 3.0.3 is _very_ old. Not sure why
that's being used for something new.

~~~
HugoDias
yes ! i'm already changing all the structure to support rails 3.2.x . Thanks
for the tip!

------
bstar77
Like others have pointed out, you'll probably not get much traction with this
project due to the way you've decided to package everything.

One immediate problem I see is that you don't have version set in your
Gemfile. Down the road, when you run "bundle install" it's just going to pull
the latest versions and most definitely break at some point.

Also, it looks like you just moved to rails 3.2... Your assets were moved into
the asset pipeline, but still exist in the public folder.

Finally, you have no tests. No serious developer is going to use ANY project
that's not well tested.

Reality is, Rails already has very mature projects using generators to
accomplish what you are tying to do. Generators allow you to give your users
options when initially setting up their application. Check out Daniel Kehoe's
"RailsApps" project here: <http://railsapps.github.com/>

Kehoe's project is a phenomenal example of how to do this well.

Good luck!

~~~
DanielKehoe
I've added Hugo Dias's project to the list of Rails starter apps at
<http://railsapps.github.com/rails-examples-tutorials.html>.

Building a starter app is a great way to get familiar with Rails. Which may be
why there are quite a few. Maintaining a starter app is more difficult
(because of frequent changes to Rails and popular gems). Which may be why the
Rails roadway is littered with the carcasses of abandoned starter apps
(remember Caboose, circa 2006?). The best are those (like Brian Cardarella's
<https://github.com/dockyard/sail_plan>) that are maintained to support
ongoing development by an organization.

Thanks for the kind words about the RailsApps project
<http://railsapps.github.com/>. It thrives because of the active contributions
from this enthusiastic community. BTW, I'll be announcing the newest release
very soon, a Rails prelaunch app for startups
<http://railsapps.github.com/rails-prelaunch-signup/> (it's not quite ready
for "Show HN").

------
liberatus
This is a great way to get all of that boilerplate app code out of the way
from the start.

However, I recommend taking a look at RailsApps Composer for deeper
customization.

<https://github.com/RailsApps/rails_apps_composer>

It's a snap to use their DSL to write scripts that generate rails templates
like this:

<https://github.com/wnadeau/rails-application-templates>

Using their composer, I wrote my own "Mailchimp" recipe for bootstrapping a
Mailchimp integrated app, including twitter bootstap (customized with
Mailchimp colors the general taste of their brand), backbonejs, oauth sign-in
all from the start.

Not to rain on any parade, this certainly looks good (and I did actually pull
down the code and take a peak).

If you like doing this kind of thing, I think you'll be really pleased with
something like RailsAppsComposer.

~~~
marcamillion
I tried Rails Apps Composer - specifically one of the example apps -
<https://github.com/RailsApps/rails3-bootstrap-devise-cancan> \- and it didn't
work as advertised.

It seems to have added some of the gems to the gemfile, but for others I had
to remove them and re-add them and go through setup manually. Specifically,
Devise & CanCan.

Do these composers just add the gems to the Gemfile then you have to configure
each manually? If that's the case, I can do that myself.

I was under the impression that these would take you to some 'baseline
configuration', then you tweak it from there.

E.g. Once I roll it up, I should have a login screen with an admin and 'dummy'
user created that I should be able to login with immediately. Some basic
authorizations setup, etc. But that's not how it works.

Maybe I was expecting too much? If it doesn't do that though, then what's the
point?

I even had to re-install the Twitter bootstrap to get it to work.

~~~
DanielKehoe
Marc, if you use the app template you'll have a ready-to-run app as soon as
"rails new ..." is done. Submit a GitHub issue [1] if it doesn't work; I'll
take a look as soon as I can. You can also clone the repo and use that as your
reference implementation. Hundreds of Rails developers have used the app;
usually any issues are resolved quickly.

[1] [https://github.com/RailsApps/rails3-bootstrap-devise-
cancan/...](https://github.com/RailsApps/rails3-bootstrap-devise-
cancan/issues)

~~~
marcamillion
Thanks for reaching out to me Daniel. What do you mean by 'ready-to-run' app?
Is it fair to have my expectations that I laid out - i.e. with say an admin &
user already created, and maybe one or two authorization rules set up?

Or is that fanciful thinking?

I guess the issue is just a disconnect between what I perceive as this
particular template being able to do (based on my impressions from the docs) -
and what it actually does.

~~~
DanielKehoe
The app will do as you expect, as described in the README and the tutorial.

------
macournoyer
(Shameless self-promotion alert! But related)

My current side project is themes for Rails based on Bootstrap, launching next
week: <http://dresssed.com/>. Demo here: <http://dresssed.com/tour>.

It will require Rails 3.1 or > for the asset pipeline.

------
scoot
If this anything useful buried in this, I'd much rather see it exposed as an
article detailing the techniques and the value behind them so I can apply them
to my own projects, rather than having to pick through the source to figure
them out for myself...

------
pimeys
Is it really Rails 3.0.3? That's kind of old.

~~~
HugoDias
Haha I created this repository now in the morning and was already about to
change the Rails version. I did not know would have an audience so quickly.
I'll switch to Rails 3.2.x

------
HugoDias
Thanks for all tips, i already changed to rails 3.2.x and i'm studying a
better way to implement this template without the entire rails structure !

------
TimPC
If you want to do this as a repo it should be setup nicely with some examples
and a index#home page that lets you connect to them. Test suites are nice too.
Other value add could be testing the deploy readiness of the asset pipeline on
heroku or other such things. Lastly, your boilerplate files have horrendous
spacing, you may want to introduce them or fix cross platform compatibility.
If it's designed to be an example it should be easily readable.

------
pringles
Don't use this without defining a new cookie secret (which is normally
generated randomly when you create a new project):

[https://github.com/hugodias/railStrap/blob/master/config/ini...](https://github.com/hugodias/railStrap/blob/master/config/initializers/secret_token.rb)

~~~
HugoDias
Nice ! Just included this tip in documentation
[https://github.com/hugodias/railStrap/commit/9fb4087173d04e9...](https://github.com/hugodias/railStrap/commit/9fb4087173d04e97f923501c5000835ba4672132)

------
tubbo
the coolest part about templates is you can modify them later on. so when we
all get tired of bootstrap or maybe you want to add coffeescript or haml or
maybe you always use the syslogger gem...with an app template you can add that
into the template itself without having to fork the whole repo.

