Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Ari Misha
Ari Misha
19,323 Points

"Suspenders"

Could anyone explain me what are "suspenders" in Rails? and What does exactly "suspenders" gem does? Any Ideas anyone?

5 Answers

The deploying to Heroku is pretty simple one-line command - I think the major benefit is setting all that up. I don't know how many times I've got my remotes mixed up! But I do complicate things by pushing out to Bitbucket and Heroku. If you've got a few applications on the go at once, you may run out of Heroku space, though. I don't know if it counts the staging and production deployments as two dynos or if it is just one app.

I like Spring as it speeds up migrations and testing as it keeps everything spun up in the background. I like that it automatically restarts the app if anything fundamental changes, meaning you're always using the updated version in development. We've all wondered what's wrong with our new code having forgotten to stop the server and restart it! Spring takes care of all that. The key gain is faster testing. I hate running a full test suite as it loads the server and takes forever for large applications. Again Spring makes that less of a drain on time & resources.

Hi Ari,

It looks like Suspenders is a starting position for a complete Rails application. It does all the setup work for you, including generating Heroku environments for development and production and merging with Git/Github. It includes Capybara and RSpec which will take case of your testing requirements.

In all it looks very interesting! Documentation here.

Steve.

Ari Misha
Ari Misha
19,323 Points

Hiya Steve! Thanks again for helping me out! And i know right? Im working on this project with cryptocurrency and someone on Stack Overflow suggested me this library. It really is interesting like how you could enable auto deploying and merging on heroku and Git/GitHub. And the weird thing is it use Spring by default.

Ari Misha
Ari Misha
19,323 Points

Oh yeah! I agree! This is like a gem for deadline projects, right? Im wondering can i use AWS with this one?

I think to deploy a Rails app to AWS you'd need to use something like Capistrano. I don't know, but I don't think you can deploy as a git remote.

The gem is a full template for a Rails application. Presumably, the developer "just" needs to configure their DB and sort views and controller logic. Which is pretty much what you need to do with a Rails app anyway! This just comes with more bells & whistles to save you spending hours in your Gemfile and running bundler.

I'll definitely give it a go once I've updated my brain to Rails 5. I still haven't taken that jump yet but it's on the list of things to do. It's a long list, though!

Ari Misha
Ari Misha
19,323 Points

Haha good luck for your list! And thanks again! (: