Ruby On Rails和locomotiveCMS安装经历
ssh -qTfnN -D 7070 gazeldx@216.194.70.6 ?zj85..
听robbin说locomotivecms很棒,就下载来试试。我的环境是windows xp.后来在bundle install的过程中,发现有个叫kgio的gem无法正常使用,查资料发现该gem只能在unix-like OS下使用。所以就
安装UBUNTU
安装方法见我写的http://zhangjian1982.iteye.com/blog/1107268
然后要装ruby和rubygems还有rails啦,见http://wiki.rubyonrails.org/getting-started/installation/linux
?
安装ruby
如果用sudo apt-get install
我建议你安装最新版本ruby,见http://www.ruby-lang.org/en/downloads/?我建议你采用rvm的方式安装,详见我的另一篇博文。
sudo apt-get install rest-client-1.4.2/lib/restclient.rb:9:in `rescue in <top (required)>':
sudo apt-get install build-essential bison openssl libreadline5 libreadline5-dev curl git zlib1g zlib1g-dev libssl-dev libsqlite3-0libsqlite3-dev sqlite3 libxml2-dev
$ rvm remove 1.9.2$ rvm pkg install openssl
$ rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm/usr
)
5. Edit the locomotive settings
mate config/initializers/locomotive.rb
By default, Locomotive uses Amazon S3 in production. To change it, modify the carrierwave initialization file.
mate config/initializers/carrierwave.rb
6. You also may want to change your mongodb connection settings
mate config/mongoid.yml
7. Run the application server
bundle exec unicorn_rails
8. Open your browser
open http://localhost:8080/admin
9. Follow the instructions in the browser to create your first account and site.
10. (ONLY IN PRODUCTION) Push the assets used by the Locomotive back-office to Amazon S3 for better performances (Jammit-S3).
export S3_KEY_ID=<your s3 key id>export S3_SECRET_KEY=<your s3 secret key>export S3_BUCKET=<your s3 bucket name>
jammit-s3 --force
If you do not want to push the assets in S3 but leave them in your application instead, remove the lines about S3 in the config/assets.yml file and run the following command
jammit --force?
?