01
install ubuntu server
02
echo "alias ll='ls -l'" >> ~/.bash_aliases
03
edit .bashrc and uncomment the loading of .bash_aliases
04
sudo apt-get update
sudo apt-get upgrade
05
sudo dpkg-reconfigure tzdata
06
sudo apt-get install ntp
07
sudo ntpdate ntp.ubuntu.com # Update time
08
sudo hostname your-hostname
09
Add 127.0.0.1 your-hostname
sudo vim /etc/hosts
10
Write your-hostname in
sudo vim /etc/hostname
11
sudo apt-get install mysql-server libmysqlclient15-dev
12
Gemrc
Add the following lines to ~/.gemrc, this will speed up gem installation and prevent rdoc and ri from being generated, this is not nessesary in the production environment.
---
:sources:
- http://gems.rubyforge.org
- http://gems.github.com
gem: --no-ri --no-rdoc
13
sudo apt-get install build-essential zlib1g-dev libssl-dev libreadline5-dev
14
Download and install Ruby Enterprise Edition
wget http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise-1.8.7-2012.02.tar.gz
tar xvfz ruby-enterprise-1.8.7-2012.02.tar.gz
rm ruby-enterprise-1.8.7-2012.02.tar.gz
cd ruby-enterprise-1.8.7-2012.02/
sudo ./installer
Change target folder to /opt/ruby for easier upgrade later on
15
Add Ruby Enterprise bin to PATH
echo "export PATH=/opt/ruby/bin:$PATH" >> ~/.profile && . ~/.profile
Verify the ruby installation
ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 20090928
16
sudo apt-get install git-core
17
sudo /opt/ruby/bin/passenger-install-nginx-module
18
cd
git clone git://github.com/jnstq/rails-nginx-passenger-ubuntu.git
19
sudo mv rails-nginx-passenger-ubuntu/nginx/nginx /etc/init.d/nginx
20
sudo chown root:root /etc/init.d/nginx
21
sudo /usr/sbin/update-rc.d -f nginx defaults
22
sudo apt-get remove imagemagick
23
sudo apt-get install libperl-dev gcc libjpeg62-dev libbz2-dev libtiff4-dev libwmf-dev libz-dev libpng12-dev libx11-dev libxt-dev libxext-dev libxml2-dev libfreetype6-dev liblcms1-dev libexif-dev perl libjasper-dev libltdl3-dev graphviz gs-gpl pkg-config
24
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
25
tar xvfz ImageMagick.tar.gz
26
cd ImageMagick-6.7.6-8
./configure
27
cd ImageMagick-6.7.6-8
make
28
cd ImageMagick-6.7.6-8
sudo make install
29
sudo ldconfig
30
sudo /opt/ruby/bin/ruby /opt/ruby/bin/gem install rmagick
31
rails new test app
vi Gemfile
remove gem 'sqlite'
bundle
31
sudo apt-get install vim-nox
32
rails new testapp -d mysql
33
cd testapp
input password
vim config/database.yml
34
insert gem 'therubyracer' into Gemfile
vim Gemfile
bundle
rake db:create:all
35
rails scaffold Post title:string body:text
36
rake db:migrate RAILS_ENV=production
Please help me to solve this problem.
Many thanks.
Vincent
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/TIPHJTBE220J.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You will get better performance in production if you set config.assets.compile to false in production.rb and precompile your assets. You can precompile with this rake task:
bundle exec rake assets:precompile
If you are using Capistrano, version 2.8.0 has a recipe to handle this at deploy time. For more info, see the "In Production" section of the Asset Pipeline Guide: http://guides.rubyonrails.org/asset_pipeline.html
Hey Vincent
Your logs would contain a stack trace of what exactly the error was. Could you send that?
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.