5 ms·
Show HN: Ruby on Rails Bootstraping
- pimeys 14y agoIs it really Rails 3.0.3? That's kind of old.
- phsr 14y agoThis would be better if it used a template file instead of forking a whole repo. http://guides.rubyonrails.org/rails_application_templates.html http://guides.rubyonrails.org/rails_application_templates.ht... The one we use at my work is here: https://github.com/dockyard/sail_plan https://github.com/dockyard/sail_plan
- billturner 14y agoYes, 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/ 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 14y agoyes ! i'm already changing all the structure to support rails 3.2.x . Thanks for the tip!
- rmoriz 14y agoalso there is another very nice solution for creating rails apps (using templates, too): http://appscrolls.org/ http://appscrolls.org/ http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/ http://drnicwilliams.com/2012/04/10/instant-new-rails-applic...
- macournoyer 14y ago(Shameless self-promotion alert! But related) My current side project is themes for Rails based on Bootstrap, launching next week: http://dresssed.com/ http://dresssed.com/. Demo here: http://dresssed.com/tour http://dresssed.com/tour. It will require Rails 3.1 or > for the asset pipeline.
- scoot 14y agoIf 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...
- liberatus 14y agoThis 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 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 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 14y agoI tried Rails Apps Composer - specifically one of the example apps - https://github.com/RailsApps/rails3-bootstrap-devise-cancan 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 14y agoMarc, 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/issues https://github.com/RailsApps/rails3-bootstrap-devise-cancan/...
- HugoDias 14y agoThanks 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 !
- bstar77 14y agoLike 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/ http://railsapps.github.com/ Kehoe's project is a phenomenal example of how to do this well. Good luck!
- DanielKehoe 14y agoI've added Hugo Dias's project to the list of Rails starter apps at http://railsapps.github.com/rails-examples-tutorials.html 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 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/ 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/ http://railsapps.github.com/rails-prelaunch-signup/ (it's not quite ready for "Show HN").
- tubbo 14y agothe 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.
- pringles 14y agoDon'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/initializers/secret_token.rb https://github.com/hugodias/railStrap/blob/master/config/ini...
- HugoDias 14y agoNice ! Just included this tip in documentation https://github.com/hugodias/railStrap/commit/9fb4087173d04e97f923501c5000835ba4672132 https://github.com/hugodias/railStrap/commit/9fb4087173d04e9...
- TimPC 14y agoIf 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.