Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
| # /etc/nginx/mime.types | |
| # Global Nginx mime.types file | |
| types { | |
| text/html html htm shtml; | |
| text/css css; | |
| text/xml xml rss; | |
| image/gif gif; | |
| image/jpeg jpeg jpg; | |
| application/javascript js; |
| function rbenvsudo(){ | |
| executable=$1 | |
| shift 1 | |
| sudo $(rbenv which $executable) $* | |
| } |
| FAYE_TOKEN = 'secretToken' | |
| if defined? Rails | |
| if Rails.env == 'development' | |
| FAYE_URI = "http://#{APP_CONFIG[:nameremoved_service][:host]}:9292/faye" | |
| else | |
| FAYE_URI = "https://#{APP_CONFIG[:nameremoved_service][:host]}/faye" | |
| end |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
| You started mongodb server, but No matter what. However, when you run sudo status mongodb again, you’ll get | |
| mongodb stop/waiting instead of mongodb start/running | |
| Note: This condition is largely due to an unclean shutdown, and results in the creation of a lockfile /var/lib/mongodb/mongod.lock. | |
| The fix is a quick two-step process as follows: | |
| Remove the lockfile. | |
| Run the repair script. | |
| This is accomplished as follows: |
| # ... | |
| gem 'carrierwave' | |
| gem 'fog', '~> 1.0.0' # Need to specify version, as carrierwave references older (0.9.0) which doesn't allow configuration of Rackspace UK Auth URL |
| # adapted from bin/sidekiq | |
| # to invoke, run: zeus runner sidekiq.rb | |
| require 'sidekiq/cli' | |
| begin | |
| cli = Sidekiq::CLI.instance | |
| cli.parse | |
| cli.run | |
| rescue => e |
Install rbenv and ruby-build to Amazon Linux (cloud-init).
user-data.sh to EC2 RunInstances user-datainstall-ruby.sh.| require 'active_record' | |
| require 'fileutils' | |
| namespace :db do | |
| desc "loads database configuration in for other tasks to run" | |
| task :load_config do | |
| ActiveRecord::Base.configurations = db_conf | |
| ActiveRecord::Base.establish_connection db_conf | |
| end |
| # First, make sure that you have the most recent rvm. Several bugs with 2.0.0-preview1 | |
| # have recently been fixed. | |
| # | |
| # Second, the openssl that comes with MacOS is too old for Ruby 2.0. You need to install | |
| # a newer one with homebrew or the rvm pkg command. | |
| # Option 1, with homebrew openssl: | |
| brew update | |
| brew install openssl |