First add the bower-rails
and the compass-rails
gems to your project's Gemfile:
# Gemfile
gem 'compass-rails'
gem 'bower-rails'
Run bundle install
and then the generator that comes with bower-rails
to set everything up:
def assets_same_since?(old_assets_version = nil) | |
return false if old_assets_version.nil? || old_assets_version.empty? | |
return false if ENV['FORCE_ASSETS_COMPILATION'] | |
changed = %x(git diff #{old_assets_version}.. \ | |
vendor/assets/ \ | |
app/assets/ \ | |
config/javascript_translations.yml \ | |
config/javascript.yml | wc -l).chomp |
ssl_certificate Definition | |
define :ssl_certificate, action: :create do | |
cert_dir = File.expand_path("../../files/default", __FILE__) | |
# Find the host certificate | |
host_cert = File.join( cert_dir, "*.#{params[:name]}.crt" ) | |
Chef::Logger.error("Could not locate host certificate for #{params[:name]}!") | |
# Find the intermediate certificate |
class Profiler | |
def self.profile(&block) | |
result = RubyProf.profile do | |
block.call | |
end | |
printer = RubyProf::GraphPrinter.new(result) | |
printer.print(STDOUT, {}) | |
end | |
end |
First add the bower-rails
and the compass-rails
gems to your project's Gemfile:
# Gemfile
gem 'compass-rails'
gem 'bower-rails'
Run bundle install
and then the generator that comes with bower-rails
to set everything up:
App::import('Core', 'Controller'); | |
App::import('Component', 'Session'); | |
$Controller = new Controller(); | |
$Session = new SessionComponent(); | |
$Session->startup($Controller); | |
$Session->read('Auth.User'); |
$ sudo /usr/bin/php /usr/lib/php/install-pear-nozlib.phar
$ cat >> ~/.bashrc <<'EOF'
alias pear="php /usr/lib/php/pear/pearcmd.php"
alias pecl="php /usr/lib/php/pear/peclcmd.php"
EOF
$ . ~/.bashrc
Install these packages:
$ apt-get install build-essential zlib1g zlib1g-dev \
libreadline6 libreadline6-dev libssl-dev libyaml-dev \
libffi-dev libgdbm-dev libx11-dev aptitude libtidy-dev \
libxml2-dev libevent-dev libev-dev autoconf
gem 'carrierwave'
to Gemfilebundle install
to install the new gemspring stop
rails generate uploader Image
image
by adding this in my model's class:# Install Ruby 2.0 | |
apt-get -y update | |
apt-get -y -m install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev libxslt1-dev libxml2-dev libcurl4-openssl-dev libffi-dev libgdbm-dev libncurses5-dev | |
cd /tmp | |
wget http://ftp.ruby-lang.org/pub/ruby/ruby-2.1.0.tar.gz | |
tar xzvf ruby-2.1.0.tar.gz | |
cd ruby-2.1.0/ | |
./configure --prefix=/usr/local | |
make |