application.scss.erb - use <%= asset_path 'background.jpg' %>
on config/environments/production.rb
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
#Steps to install RVM + Ruby 1.9.2 + Rails + nginx + Passenger on CentOS (tested on v5.5) | |
# Install git and curl, if not already installed | |
sudo yum install git | |
sudo yum install curl | |
# Create the rvm group and add any users who will be using rvm to the group | |
sudo su - | |
groupadd rvm |
source 'https://rubygems.org' | |
gem 'rails', '3.2.1' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' | |
#!/bin/sh | |
sudo yum erase ruby ruby-libs ruby-mode ruby-rdoc ruby-irb ruby-ri ruby-docs | |
sudo yum install openssl-devel zlib-devel \ | |
gcc gcc-c++ make autoconf readline-devel \ | |
curl-devel expat-devel gettext-devel | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -xvzf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125/ | |
./configure --prefix=/usr/local |
gem install yard | |
gem install redcarpet #needed to show markdown files | |
gem install github-markup | |
yard gems --rebuild | |
yard server -r -g -d | |
Started getting error below with edge mongoid.
aki@rydeen~/Dropbox/RubyProjects/zitta-orders > rails c
Loading development environment (Rails 3.2.6)
ruby-1.9.2-p290 :001 > ap 'wheee'
NameError: uninitialized constant BSON
from /Users/aki/.rvm/gems/ruby-1.9.2-p290/gems/awesome_print-1.0.2/lib/awesome_print/ext/mongoid.rb:23:in `cast_with_mongoid'
from /Users/aki/.rvm/gems/ruby-1.9.2-p290/gems/awesome_print-1.0.2/lib/awesome_print/formatter.rb:24:in `format'
Seems variables defined by let(){} is lazily instantiated.
This caused problems like so in specs:
let(:estimate){Fabricate.build(:shipping_estimate)}
...
ShippingEstimate.should_receive(:new).and_return(estimate)
...
# ends up calling methods on uninstantiated (nil) estimate
On OS X 10.7.4, you need to install libyaml by hand. Using homewbrew:
brew install libyaml
Then you can happily install python modules
sudo easy_install nltk SOAPpy pyOpenSSL lxml