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 -full build-essential这种方式安装到ruby的版本由ubuntu决定,如果自己想指定版本,则通过ftp://ftp.ruby-lang.org/pub/ruby/1.8/下载。

测试用ruby -v和$ ruby -ropenssl -rzlib -rreadline -e "puts :Hello" Will show:Hello

我建议你安装最新版本ruby,见http://www.ruby-lang.org/en/downloads/  我建议你采用rvm的方式安装,详见我的另一篇博文。

sudo apt-get install ruby gems即可。但是这种方法安装会导致rails的命令不能作为命令行直接执行,所以我建议按照rubyonrails.org的官方写法:即http://rubyforge.org/frs/?group_id=126下载,然后解压缩,然后执行 sudo ruby setup.rb

sudo ln -s /usr/bin/gem1.8 /usr/bin/gem, rubygems被装到了/usr/lib/ruby/gems下面。

安装rails

如果用sudo apt-get install rails。测试用rails -h 这种方式会把rails安装到/usr/bin/rails ,安装的版本往往不是rails的最新版本,这是不推荐的。我推荐官方到安装方式:sudo gem install rails ,即通过rubygems安装,这能安装最新版本。

/var/lib/gems/1.8/gems/这是通过sudo apt-get rubygems的安装rails的目标文件夹。
/usr/lib/ruby/gems/1.8/gems/这是通过自己编译ruby setup.rb安装rubygems后安装rails的目标文件夹

然后我开始

rails new tweb

报错

bundle install后发现报sqlite3的错误:Installing sqlite3 (1.3.4) with native extensions /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
用sudo apt-get install libsqlite3-dev

和sudo gem install sqlite3-ruby解决

安装locomotive CMS

按照它官网的方法安装(因为有墙,所以我在文后加上相关内容),安装时如果执行bundle install报错,则执行sudo gem install bundler即可 (look:Bundler is a tool that manages gem dependencies for your ruby application. 后来报错:

 Could not find gherkin-2.5.2 in any of the sources,可能和我使用了rails3.1版本有关。目前locomotivecms是用3.0.10,因为这个问题,我没有安装成功,所以,我们现在必须把版本换到3.0.10,方法见:我之前写的一个文章,你可以搜索RVM http://zhangjian1982.iteye.com/blog/1222579

)。

这时要执行bundle install了。下面两个错误一般都会报,所以如果你打算节省时间,直接解决掉再执行。

*报错nokogiri 。。 native extension libxml2 is missing,用sudo apt-get install libxslt-dev libxml2-dev 解决

*报错Installing rmagick (2.12.2) with native extensions /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/usr/bin/ruby1.8 extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.12.2. Can't find Magick-config in /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
Can't find Magick-config

解决办法:

sudo apt-get install libmagick9-dev

sudo apt-get install libmagickwand-dev

在Engine installation方法下,bundle exec rails g locomotive:install会报错 :解决办法见本文下面的介绍!

bundle exec unicorn_rails启动rails

最后访问http://127.0.0.1:8080/admin OK啦。

官方安装说明:

Installation guide

Locomotive runs on my different platforms, but it's optimized for the Bushido hosting platform. Bushido enables Locomotive to set subdomains and custom domains directly, launch with built-in email accounts, and provides highly reliable hosting, all with a single click.

We suggest you to start to read the requirements section. Then choose one of the installation methods.
If you want to test Locomotive and sneak into the code, we recommend you the from source installation.

Let us know if you have any suggestions or if you find bugs .

Requirements

Ruby

Of course :-)

We tested it with both Ruby 1.8.7 (2009-06-12 patchlevel 174) and Ruby 1.9.2.p0 which are two of Ruby versions Heroku supports.

Please note that performances are much better with Ruby 1.9.2 and the stability seems okay (no bugs found for now).

Mongodb

Locomotive CMS does not use a classic sql database such as mysql or postgresql but rather a nosql database named mongodb.

Mongodb is available on many OS. Check this link out for more information.

Note: We suggest you to take a version from 1.6.0.

ImageMagick

Uploaded images for asset collections are cropped, for example, and Locomotive uses ImageMagick for this purpose. Again, ImageMagick is available on a large set of OS.

Note: On Mac OS X, try Homebrew or MagickInstaller to install it. This will save you a couple of hours because its installation can be really painful sometimes.

Browsers (back-office)

We haven't had time to test the IE versions. So for now, we ask you to use the Locomotive back-office with the following browsers: Safari , Firefox and Chrome

From source installation

This way of installing Locomotive is recommended when you want to add new features, correct bugs or see how Locomotive works internally.

1. Get source code from github.

git clone git://github.com/locomotivecms/engine.git locomotive
cd locomotive

2. Install gems.

bundle install

3. Edit the Locomotive settings.

mate config/initializers/locomotive.rb

Note: If you run Locomotive in local and with the multi-sites mode on, do not forget to update your /etc/hosts file accordingly.

By default, Locomotive uses Amazon S3 in production. To change it, modify the carrierwave initialization file.

mate config/initializers/carrierwave.rb

4. You also may want to change your mongodb connection settings.

mate config/mongoid.yml

5. Run the application server.

bundle exec unicorn_rails

6. Open your browser.

open http://localhost:8080/admin

7. Follow the instructions in the browser to create your first account and site.

8. (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 and instead leave them in your application, remove the lines about S3 in the config/assets.yml file and run the following command:

jammit --force

Engine installation

This is probably the cleanest way to build your own comprehensive hosting CMS platform because the Locomotive core cannot be broken and all you need to do is add your own content.

1. First, create a Rails project.

rails new my_platform -O -T -J
cd my_platform
rm public/index.html

2. You have to tell your Rails app that you want to include the Locomotive gem available on Gemcutter. Edit your application Gemfile and add these lines if missing.

gem 'rails', '3.0.10'
gem 'locomotive_cms', :git => 'git://github.com/locomotivecms/engine.git', :require => 'locomotive/engine'
gem 'unicorn', :group => 'development'

3. Install gems

bundle install

4. Add the Locomotive config files and assets

bundle exec rails g locomotive:install

(注意:这句话执行很可能报错rest - client - 1.4 . 2 / lib / restclient . rb : 9 : in `rescue in <top (required)>':

no such file to load -- net/https. Try running apt-get install libopenssl-ruby (LoadError)

解决办法:

$  sudo apt-get install build - essential bison openssl libreadline5 libreadline5 - dev curl git zlib1g zlib1g - dev libssl - dev libsqlite3 - 0 libsqlite3 - 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

Ruby On Rails和locomotiveCMS安装经历相关推荐

  1. ruby on rails win下安装

    ruby on rails win下安装 发现新的技术ruby on rails,关于他一些介绍就不说了,我说下今天的我的安装过程! 首先是下载 http://rubyforge.org/projec ...

  2. Ruby On Rails的傻瓜安装

    Windows下安装步骤: 1. 到这里下载XAMPP.XAMPP是一个集合Apache,PHP,MySQL的软件包.你可以选择安装的目录.严格说来,你不需要Apache和PHP,但是一般数据库都选用 ...

  3. windows安装ruby on rails

    安装ruby on rails for windows 安装ruby 我们需要command prompt 就是cmd 环境下的一些命令. 安装windows版本的ruby程序,安装的时候记得勾选环境 ...

  4. [rails] 我的订餐系统 -- 小试ruby on rails(转)

    前言         近期在java社区中一种新的脚本语言ruby,及用ruby开发的一个wab框架 rails也热闹了起来.引起了不少的java开发人员的关注. 本人平时还是很少接触脚本语言方面东东 ...

  5. react前端项目_如何使用React前端设置Ruby on Rails项目

    react前端项目 The author selected the Electronic Frontier Foundation to receive a donation as part of th ...

  6. “Ruby on Rails 之 Oracle 应用”常见问题解答

    目录 为什么使用 RUBY ON RAILS? 定义 Ruby 是什么? Rails 是什么? 模型-视图-控制器模式 (MVC) 是什么? RubyGems 是什么? OCI8 是什么? ORACL ...

  7. 新手安装ruby on rails(ror)的成功必备手册

    2019独角兽企业重金招聘Python工程师标准>>> 如何快速正确的安装 Ruby, Rails 运行环境 每一位使用windows系统来进行ROR开发项目的都是这个世界上折翼的天 ...

  8. 安装Ruby和Rails运行环境

    为什么80%的码农都做不了架构师?>>>    centos安装ruby RVM的安装 rvm是一个命令行工具,可以提供一个便捷的多版本ruby环境的管理和切换. shell> ...

  9. Ruby on Rails的下载及安装以及开发环境的搭建

    要基于ruby开发应用程序,我们必须安装ruby.gem.rails.mongrel. 第一,到官方网站上下载最新的Ruby One-Click Installer版本(已经自带了RubyGems,一 ...

  10. 安装 Ruby 和 Rails 开发环境

    最近开始学习ruby on rails,为自己的学习记录一下. 安装 系统:OS X 10.8 根据http://ruby-china.org/wiki/install_ruby_guide 安装即可 ...

最新文章

  1. windows磁盘分区
  2. volatile 和 sig_atomic_tlinux
  3. win8 开发之旅(16)---------足球游戏揭秘(2)
  4. 奥数国家队最强6人集结,深圳中学独占2席,人大附中连续三年入围
  5. 复旦大学计算机学院博士生王斌,复旦大学计算机科学技术学院博士生刘鹏飞荣获...
  6. 5年后你最想要什么?
  7. keep老是显示服务器开小差,nginx+keepalived高可用服务器宕机解决方案
  8. 阿里巴巴在宁成立江苏总部
  9. [转] Android SDK manager 无法获取更新版本列表
  10. Kali linux新手入门视频教程Kali linux安装
  11. Vins-Fusion运行kitti,euroc和tum数据集并使用evo评估
  12. 多次请求后tomcat网页假死
  13. Python实现简易图形用户界面计算器
  14. win10重置网络命令_重置网络:Win10重置网络的技巧
  15. tcp协议栈优化1-增加TCP初始拥塞窗口 ===》流氓的方式
  16. 一键帝国CMS快速重置管理员密码工具
  17. Matlab符号运算(符号的创建和简单运算、函数求导、不定积分和定积分、解方程组)代码和解释
  18. WordPress快速增加百度收录的方法
  19. 二、对HEVC/H.265视频编解码器进行隐写的基本思路
  20. “共享汽车”探索城市交通建设新模式

热门文章

  1. 软件测试面试题(等待解答)
  2. 毕业设计写作基本步骤
  3. js生成execl表格
  4. lwj_C#_homework get set 属性
  5. 李笑来《财富自由之路》思维导图
  6. 2021年西式面点师(中级)考试题库及西式面点师(中级)模拟试题
  7. android后台定时执行任务,后台执行的定时任务
  8. navicat怎么清除干净
  9. 0723数组复习 堆区 动态数组
  10. 【算法工程师】成为一名优秀的机器学习算法工程师所需知识及资料汇总-附思维导图