Skip to content

Instantly share code, notes, and snippets.

View ideaoforder's full-sized avatar

Mark Dickson ideaoforder

  • Sitesteaders Developement
View GitHub Profile
@rpheath
rpheath / authlogic-to-devise.md
Last active December 30, 2020 14:35
Steps and troubleshooting tips when moving Authlogic to Devise.

How To: Authlogic to Devise

Step 1: Migration

  1. bin/rails g migration AuthlogicToDevise
  2. (see the file below for the actual migration, authlogic_to_devise.rb)
  3. bin/rake db:migrate

Step 2: Update Gemfile

  1. gem "devise", "~> 2.2.0"
  2. bundle install
@shapeshed
shapeshed / nginx_rails_3_1
Created October 10, 2011 19:13
Nginx Config for Rails 3.1 with Unicorn and Asset Pipeline
upstream app {
server unix:/srv/app/current/tmp/sockets/unicorn.sock fail_timeout=0;
}
server {
listen 80;
server_name www.app.com;
rewrite ^/(.*) http://app.com/$1 permanent;
}
server {
@vvalgis
vvalgis / Capistrano tasks for starting unicorn.rb
Created May 7, 2010 08:13
Capistrano tasks for starting unicorn
set :rails_env, :production
set :unicorn_binary, "/usr/bin/unicorn"
set :unicorn_config, "#{current_path}/config/unicorn.rb"
set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid"
namespace :deploy do
task :start, :roles => :app, :except => { :no_release => true } do
run "cd #{current_path} && #{try_sudo} #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D"
end
task :stop, :roles => :app, :except => { :no_release => true } do
@pcreux
pcreux / migrate_rubygems_to_ruby_enterprise_edition.rb
Created February 12, 2010 22:14
Migrate rubygems to Ruby Enterprise Edition (REE) - Make REE install the gems used by your default ruby environment.
#!/usr/bin/ruby
# Migrate rubygems to Ruby Enterprise Edition (REE)
# Make REE install the gems used by your default ruby environment.
REE_PATH = ENV['REE_PATH'] || Dir.glob('/opt/ruby-enterprise-*').last
unless REE_PATH
puts "Can't find path to ruby enterprise edition. Please use the following command:"
puts "REE_PATH=/path/to/ruby-enterprise ruby migrate-rubygems-to-ree"