Gems

They already solved it AND wrote it? Well how much is that going to cost me? It’s free!?! Well heck yeah, sign me up!
There are times to use gems, and there times not to use gems. In either case, you will want to be educated when making these decisions. What have you learned when using a particular gem? What are those little steps that were not spelled out, or that were unique to your app, that you needed to do in order to get the gem to work properly for you? You will want to remember these little additions and subtractions for your next project.

Gem to help with Rails Errors

05/10/15  Public, Rails Errors, Gems

When dealing with a particularly complex bug, logging and raising errors can become tedious or imprecise. The better_errors gem is there to help. The gem transforms your in-browser error page, add...

0 votes - harrylevine

After log in should redirect to a page other than default root

11/16/14  Public, Rails General, Gems

When using Devise, when a registered user logs in, they are, by default, directed to the root.

Here is the code to change this to being directed to a page of your choosing

In `app/controllers/appl...

1 vote - harrylevine

Determine what gems in your project have newer versions available

11/08/14  Public, Rails General, Gems

Run bundle outdated

To help decide if you want to take action and update a particular gem, view the gem's changelog.

For example, if there is an updated version of Devise available, Google devise changelog to determine what has been ch...

1 vote - harrylevine

Updating Rails version for a patch update, i.e. from 4.1.1 to 4.1.7

11/07/14  Public, Command Line, Gems, Rails General

  • Create a new branch
  • update the gemfile to gem 'rails', '4.1.7'
  • run bundle
  • this may show conflicts in other rails dependencies like
    • actionview, actionpack, actionmodel, etc
  • in order to update these Rails associated items, and...

1 vote - harrylevine

How to run a spec / test when there is a time latency or lag involved

10/28/14  Public, Testing / TDD, Gems

For example, if something is supposed to automatically delete every 7 days, how do you test for that?

Two ideas

  1. You can manually changed the created_at data in the database to back date an item, simulating it was created 7 days ago

...

1 vote - harrylevine