Linux Deploy Rails3 with Ruby1.9.2 (3)

分类:OS 2011-08-23 来源:CodeWeblog.com 人气:145

Linux Deploy Rails3 with Ruby1.9.2 (3)

I will not give up this. I solved the problem bellow:
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error: 14090086: SSL routines: SSL3_GET_SERVER_CERTIFICATE: certificate verify failed

I find a new way to try. I follow curl-k to install ruby1.9.2 via rvm.

we will make-k to every curl to fix the
> Vi ~ / .rvm / scripts / fetch
add-k option parameter after every curl.

1. Install ruby1.9.2
> Sudo rvm install 1.9.2
> Sudo rvm - default ruby-1.9.2-p290
> Ruby-v
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]
> Which ruby
~ / .rvm/rubies/ruby-1.9.2-p290/bin/ruby

2. Install rails
> Sudo gem install rails - pre - no-ri - no-rdoc-v = 3.1.0.rc5
> Rails-v
Rails 3.1.0.rc5
> Which rails
~ / .rvm/gems/ruby-1.9.2-p290/bin/rails

3. Install passenger and sqlite3
> Sudo gem install-V passenger
> Sudo gem install sqlite3-ruby
error message:
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
solutions:
> Wget http://www.sqlite.org/sqlite-autoconf-3070400.tar.gz
or
> Wget http://www.sqlite.org/sqlite-amalgamation-3.7.2.tar.gz

> Tar zxvf sqlite-autoconf-3070400.tar.gz
> Cd sqlite-autoconf-3070400
>. / Configure - disable-shared - enable-static - prefix = / usr/sqlite3
> Sudo mkdir / usr/sqlite3
> Make
> Sudo make install
> Sqlite3-version
3.7.4
> Sudo cp sqlite3 / usr/bin/sqlite3
> Which sqlite3
/ Usr/bin/sqlite3
> Sudo gem install sqlite3-ruby - - with-sqlite3-dir = / usr/sqlite3

great, it is done.

4. Try to start the rails
> Rails s
error messages:
`Autodetect ': Could not find a JavaScript runtime.

solutions:
Try to install nodejs on the server side, this is the javascript server side javascript.
> Wget http://nodejs.org/dist/node-v0.4.8.tar.gz
or
> Wget http://nodejs.org/dist/node-v0.5.0.tar.gz
> Tar zxvf node-v0.4.8.tar.gz
> Cd node-v0.4.8
>. / Configure - prefix = / usr / nodejs

error message during configure time:
raceback (most recent call last):
File "/ home/luohua/tmp/node-v0.4.8/tools/waf-light", line 157, in?
import Scripting
File "/ home/luohua/tmp/node-v0.4.8/tools/wafadmin/Scripting.py", line 9, in?
import Utils, Configure, Build, Logs, Options, Environment, Task
File "/ home/luohua/tmp/node-v0.4.8/tools/wafadmin/Build.py", line 18, in?

solutions:
It is said that my python version is too old, I need to update it.
> Python-V
Python 2.3.4
That is the truth. My version of python is 2.3. I will upgrade python2.3.4 to python 2.6.1.
> Wget http://www.python.org/ftp/python/2.6.1/Python-2.6.1.tar.bz2
> Tar-jxvf Python-2.6.1.tar.bz2
> Cd Python-2.6.1
>. / Configure - prefix = / usr/python2.6.1
> Sudo mkdir / usr/python2.6.1
> Make
> Sudo make install
> Sudo mv / usr / bin / python / usr/bin/python2.3.4
> Sudo ln-s / usr/python2.6.1/bin/python / usr / bin / python
> Python-V
Python 2.6.1

It is great, nothing go wrong. I will go on my nodejs installation.

>. / Configure - prefix = / usr / nodejs
> Sudo mkdir / usr / nodejs
> Make

error message:
Build failed: -> task failed (err # 2):
{Task: libv8.a SConstruct -> libv8.a}
make: *** [program] Error 1
sulotions:
compile and install v8, first of all, download and install SVN client on my system.
Install SVN Client
Down load the file from this URL
http://www.open.collab.net/files/documents/60/4612/CollabNetSubversion-client-1.6.17-1.i386.rpm
> Sudo rpm-ivh CollabNetSubversion-client-1.6.17-1.i386.rpm
the svn installation place is / opt / CollabNet_Subversion / bin
we need to link it to the / usr / bin
> Sudo ln-s / opt / CollabNet_Subversion / bin / svn / usr / bin / svn
> Svn - version
svn, version 1.6.17 (r1128011)

svn installation work is done, I will go on with the v8 installation.

Install scons tool,
> Wget http://prdownloads.sourceforge.net/scons/scons-2.1.0.alpha.20101125.tar.gz
> Tar zxvf scons-2.1.0.alpha.20101125.tar.gz
> Cd scons-2.1.0.alpha.20101125
> Sudo python setup.py install
> Sudo ln-s / usr/python2.6.1/bin/scons / usr / bin / scons
> Scons-v
SCons by Steven Knight et al.:
script: v2.1.0.alpha.20101125.r5183 [MODIFIED], 2010/11/25 14:46:21, by bdeegan on ubuntu
SCons is done.

> Svn checkout http://v8.googlecode.com/svn/trunk/ v8
> Cd v8
> Scons
> Sudo cp libv8.a / usr/lib/libv8.a
> Sudo cp libv8preparser.a / usr/lib/libv8preparser.a
> Sudo cp-r include / * / usr / include /
> Sudo chmod a + x libv8.a
> Sudo chmod a + x libv8preparser.a

v8 is done, go on the nodejs things.

> Sudo make clean
> Sudo make

error messages:
scons: *** [obj / release / platform-linux.o] Error 1
scons: building terminated because of errors.
Waf: Leaving directory `/ home/luohua/tmp/node-v0.4.8/build '
Build failed: -> task failed (err # 2):
{Task: libv8.a SConstruct -> libv8.a}
make: *** [program] Error 1

solutions:
change to 0.5.0 version
I got another error message:
ev / ev.c: 389:26: error: sys / inotify.h: No such file or directory
make [1]: *** [ev / ev.o] Error 1
make [1]: Leaving directory `/ home/luohua/node-v0.5.0/build/default/deps/uv '
Waf: Leaving directory `/ home/luohua/node-v0.5.0/build '
Build failed: -> task failed (err # 2):
{Task: uv uv.h -> uv.a}
make: *** [program] Error 1

copy the a files to our nodejs 0.4.8 lib directory
> Sudo cp / usr/lib/libv8.a lib/libv8.a
> Sudo cp / usr/lib/libv8preparser.a lib/libv8preparser.a

Not working.
try coping libv8 and libv8preparser to / usr / local / lib
> Sudo cp libv8 * / usr / local / lib /
> Sudo chmod a + x / usr/local/lib/libv8.a
> Sudo chmod a + x / usr/local/lib/libv8preparser.a

>. / Configure \
- Prefix = / usr / nodejs \
- Shared-v8 \
- Shared-v8-includes = / home/luohua/v8/include \
- Shared-v8-libpath = / usr / local / lib \
- Shared-v8-libname = v8
> Sudo make

error message:
Build failed: -> task failed (err # 1):
{Task: cxx platform_linux.cc -> platform_linux_3.o}
make: *** [program] Error 1
solutions:
commenting out the "PR_SET_NAME" line in src / platform_linux.cc
prctl (PR_SET_NAME, process_title); deleting this line

> Sudo make clean
> Sudo make

error messages:
.. / Src / node_crypto.cc: 2917: error: 'SSL_COMP_get_compression_methods' was not declared in this scope
Waf: Leaving directory `/ home/luohua/tmp/node-v0.4.8/build '
Build failed: -> task failed (err # 1):
{Task: cxx node_crypto.cc -> node_crypto_3.o}
make: *** [program] Error 1
solutions:
compile and install openssl
> Wget http://www.openssl.org/source/openssl-1.0.0d.tar.gz
> Tar zxvf openssl-1.0.0d.tar.gz
>. / Configure
> Sudo make
> Sudo mkdir / usr / openssl
> Sudo make install

openssl install success, go on.

>. / Configure \
- Prefix = / usr / nodejs \
- Shared-v8 \
- Shared-v8-includes = / home/luohua/v8/include \
- Shared-v8-libpath = / usr / local / lib \
- Shared-v8-libname = v8 - openssl-includes = / usr / local - openssl-libpath = / usr / local

this solution is not work for me. Trying another way without ssl.

>. / Configure \
- Prefix = / usr / nodejs \
- Shared-v8 \
- Shared-v8-includes = / home/luohua/v8/include \
- Shared-v8-libpath = / usr / local / lib \
- Shared-v8-libname = v8 - without-ssl
> Sudo make
> Sudo make install
> Sudo ln-s / usr / nodejs / bin / node / usr / bin / node
> Node - version
v0.4.8

> Cd my_project_location
> Sudo rm Gemfile.lock
> Bundle install
> Sudo rails s

It is fucking great. The rails server run successfully on redhat now.

references:
http://hi.baidu.com/beyond_javy/blog/item/986fee1f4f8bfa1d314e15f6.html
http://anylinux.info/?p=116
http://wuhuizhong.iteye.com/blog/1106968/
http://www.scons.org/doc/1.0.1/HTML/scons-user/x124.html
http://superuser.com/questions/262385/getting-node-js-0-4-2-to-build-install-on-freebsd-8-2-amd64
http://pasobellatech.posterous.com/installing-nodejs-alongside-django-on-macbook
http://stackoverflow.com/questions/6118711/error-install-nodejs-ssl-comp-get-compression-methods
http://nelsonslog.wordpress.com/2011/04/10/node-without-ssl/

分享到:
blog comments powered by Disqus

相关文章

  • Under linux tar gz bz2 tgz z zip file decompression method 2010-02-08

    Under linux tar gz bz2 tgz z zip file decompression method Under linux tar gz bz2 tgz z, and many other methods of extracting compressed files This is to facilitate the collection of the http://hi.baidu.com/sillyboy/blog/item/3802b600174d768fe850cd66 ...

  • How to create and extract the Linux zip, tar, tar.gz and tar.bz2 files 2010-08-17

    Data compression for us it is very useful. Whether it is in the message sent pictures with the zip file or compressed data files in Fuwu Qi, we can allow downloads to be more easy or Youxiao the save disk Kong Jian. Sometimes certain compression form

  • How to decompress zip, tar, tar.gz, tar.bz2 file 2011-02-22

    Over the years, data compression, for us it is very useful. Whether it is a picture in a message sent with the compressed zip file or data file on the server, we can make it easier to download or save disk space effectively. Some compression format a

  • mysql under linux binaries (tar.gz) installation 2010-05-22

    ubuntu is very easy to install mysql, ubuntu directly if you are running: To install MySQL, you can run the following terminal command prompt: sudo apt-get install mysql-server sudo apt-get install mysql-client sudo apt-get install php5-mysql / / Ins ...

  • Learn Linux, compile and install mysql-5.0.45.tar.gz 2011-04-24

    Compiled under Linux install mysql-5.0.45.tar.gz Reproduced <! - Body start -> (1) ------------- ---------- Preparatory work 1: If the downloaded file is named: mysql-5.0.45.tar.gz 2: If the copy to the / home under the 3: groupadd mysql # add

  • samba source installation (tar.gz) 2011-05-14

    The core is two samba daemons smbd and nmbd program to stop the server during startup and running. Smbd and nmbd to use all the configuration information are all stored in the smb.conf file. Smb.conf to two daemons smbd and nmbd to explain what the o

  • Compile and install MySql.tar.gz Ubuntu 10.10 2010-10-30

    First, install Mysql 1, sudo apt-get install g + + gcc make automake perl libncurses5-dev kdelibs_dev kdelib (To ensure good installation tools required) 2, cd ~ / Downloads (Enter the archive directory) 3, tar zxvf mysql-6.0.2-alpha.tar.gz (Extract here)

  • linux source code installation installation rpm.tar.gz experience 2011-01-21

    rpm package installation package if there is interdependence can install multiple rpm packages Such as: rpm-i asdf.rpm asdf.rpm tar.gz source package installation time .. If the. / Configure can not make the situation after .. look out. / Configure the la

  • windows data is automatically compressed into tar.gz file, support for linux, linux windows copy file on the host 2011-07-09

    windows2003 play compressed data compression under @echo off set day=%date:~8,2% set month=%date:~5,2% set year=%date:~0,4% set yyyymmdd=%year%%month%%day% set dataDir=F:/data/ set dataDisk=F: set datafiles=*.dat set sshDir=C:/Program Files/OpenSSH/home/A

  • mysql-5.1.40-linux-i686-glibc23.tar.gz installation notes 2011-04-15

    mysql-5.1.40-linux-i686-glibc23.tar.gz installation notes 1 First, add the mysql user group Shell Code shell> groupadd mysql 2 Add the mysql user and mysql user group assigned to Shell Code shell> useradd -g mysql mysql 3 Extract the mysql-vers

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.273 (s). 12 q(s)