Rails 4, Rspec not letting go of Gemfile.lock, can't Git Pull, can't checkout

coding software rspec

Alright, this is going to be a super quick post but thought I'd let people know as this has come up a couple of times.

The environment is

  • Rails 4 or above
  • Git
  • Rspec for testing

So here's the issue. Every now and then, I try to do a Git Pull (say after a pull request has been merged) and Git won't let me because it seems my Gemfile.lock has some local changes that would be overwritten.

Easy enough, right? Just stash, or discard the changes. So I tried running 'git stash', or 'git checkout Gemfile.lock'. But then right after, I do a 'git status', and low and behold, the Gemfile.lock still has local changes. What the hell? Why isn't Git letting me stash the changes.

Well, it turns out, Git is letting me stash the changes, but very shortly after, something is changing the Gemfile.lock file right away. So right after I stash my changes, or discard, something comes right back and makes the changes again.

The culprit? Rpsec- well more specifically spring. So after running rspec, spring continues to run. As far as I understand, spring keeps your Rails environment running so you don't have to reload it on every rspec run (as far as I know, I could be way off). But the short of it is, the first time your run rspec, it fires up spring, and spring holds onto your Gemfile.lock.

So after you discard your changes, spring will apply the changes right again on Gemfile.lock (and perhaps other files).

How to solve it?

Simply stop spring by running "spring stop". At that point, you should have no issue discarding your changes using Git.

Worried about spring being stopped? Don't worry, it starts up again the next time you run rspec.

Alright, that's it for now. Hope that helps some peeps!

Casey Li
CEO & Founder, BiteSite

Ruby on Rails ActionMailer Configuration for Namecheap Private E-mail

coding software

Ever try setting up Ruby on Rails to use Namecheap's private e-mail to no avail. Me too. Finally figured out some settings that made things work.

First off, for your smtp settings:

config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :address => '', :port => 26, :user_name => ', :password => 'yourpassword, :authentication => :plain, :enable_starttls_auto => true }

Of course, you can throw everything into environment variables.

config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :address => ENV['SMTP_SERVER'], :port => ENV['SMTP_PORT'], :user_name => ENV['SMTP_USER'], :password => ENV['SMTP_PASSWORD'], :authentication => :plain, :enable_starttls_auto => true }

But the key thing here, or at least the thing that's unusual is PORT 26!!! It's right there in Namecheap's documentation but they say if you're going to use starttls - you must use port 26. That was the main thing that I seemed to stumble on. The other settings are very similar to say GMail settings.

Also, I did set my "from" address in my Mailer class to match my domain which may or may not have helped - I was too lazy to do a controlled experiment on that.

Anyway, hope that helps some peeps.

Casey Li
CEO & Founder, BiteSite

After Effects Editing Mask Path (moving individual points)

after effects film motion graphics

Alright, this was frustrating the hell out of me - especially considering most posts and forum responses had the right idea but were missing one key element.

The issue is in Adobe After Effects and Masks.

Here's the setup

  • You have some layer (shape, picture, footage, whatever)
  • You add a layer Mask
  • You edit the Mask over time by setting keyframes on the Mask Path property

The issue

Anytime you try to move a single point on the Mask Path - the entire mask path moves - regardless of if you have the Pen Tool or Selection Tool selected

So yes - most posts ands forum responses I've seen talk about - "Make sure you have the Pen Tool" selected - so that way you're in path editing mode and then you should be able to move the individual points. I tried ad nausea and I couldn't get this to work.


  • It all had to do with what was selected in the timeline. I had the Mask selected (that is, the Mask property that shows up when you twirl down the layer itself) - which is wrong. This was the issue.
  • Once I selected the layer itself and NOT the mask, I could then select the Pen Tool and edit the points individually. Kind of strange - but yeah - select the Layer and not its mask if you want to edit the Mask points individually. And yes - use the Pen Tool.

(note this is in Adobe After Effects CS6 - not sure about other versions).

Hope this helps out some peeps.

Casey Li
CEO & Founder, BiteSite