Skip to content

Instantly share code, notes, and snippets.

View kazpsp's full-sized avatar
🎯
Focusing

rodrigo zurek kazpsp

🎯
Focusing
View GitHub Profile

Upgrading Ruby using RVM on Digital Ocean's Ruby on Rails on Ubuntu 14.04 (Nginx + Unicorn) Image

For those out there more advanced, this is probably not worth reading. However, if you’re fairly new to system admin on a Digital Ocean Ubuntu/Nginx/Unicorn/MySQL/Ruby on Rails setup, it may help you out. Recently, I needed to upgrade my ruby version from 2.0.0-p353 to version 2.2.0 on my Digital Ocean droplet. I felt like this would be fairly easy to do since RVM comes installed with the ‘Ruby on Rails on 14.04 (Unicorn + Nginx)’ image that Digital Ocean provides under the ‘Applications’ tab when creating a Droplet.

While it is true that installing a new version of ruby using RVM on your system is fairly easy, there’s a few locations that you MUST change in order to use the new ruby version. This is where if you are unfamiliar or new to this, you could spend a decent amount of time digging for these. Hopefully this will save you the time and make your upgrade fairly smooth.

Let’s get started!

Step 1: Tak

@kazpsp
kazpsp / passwords_controller.rb
Created August 14, 2012 16:40 — forked from guilleiguaran/passwords_controller.rb
StrongParameters with Devise
# app/controllers/users/password_controller.rb
class Users::PasswordsController < Devise::PasswordsController
def resource_params
params.require(:user).permit(:email, :password, :password_confirmation)
end
private :resource_params
end