Linux Deploy Rails3 with Ruby1.9.2 (3)

sponsored links
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/
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of Linux Deploy Rails3 with Ruby1.9.2 (3)

  • Rails source code analysis (4): Request / Response

    1) Rails defines two abstract class: AbstractRequest and AbstractResponse code is not posted, first take a look at Response. 2) is mainly responsible for the specific ctgi_process.rb main interface is responsible for implementation methods of impleme ...

  • fck pages

    <% @ Page contentType = "text / html; charset = UTF-8"%> <% @ Include file = "/ commons / taglibs.jsp"%> <% @ Taglib uri = "/ FCKeditor" prefix = "FCK"%> <script language = "javascript

  • flash chart summary

    pen Flash Chart is an open source Flash chart drawing tool, offers a variety of programming interfaces, including PHP, Ruby, Perl, Python, Java,. Net, AS, JS, etc. to generate a variety of data interfaces, and then Flash to display the function is to ...

  • Rails2.0.2 change the default DB adpter

    In Rails2.0.2 rails demo ... ... MissingSourceFile in SayController # hello no such file to load - sqlite3 RAILS_ROOT: / home / kenb / rails-projects / demo ... ... Checked config / database.yml, adpter default is set become the sqlite3. Check the ra ...

  • RSpec troubleshooting

    1.uninitialized constant Dependencies Conditions: In windows under way to install the RSpec gem and rspec-rails. However, in ruby script / spec_server to do the test under the spec your_spec.rb-X will appear uninitialized constant Dependencies (NameE ...

  • Alternative to Java with Ruby to do unit testing interface rest!

    Ruby is long overdue to replace java more flexible and make some necessary changes in a matter of, if not deep-rooted culture of the company's java, I think. . . . . . The following are my Writing for the Rest of the interface used to make the test su

  • Answer: After 2.2 upgrade mysql question-driven

    windows installed after the mysql gem error, error is approximately: ArgumentError (NULL pointer given): (eval): 3: in `each_hash ' (eval): 3: in `all_hashes' This is feeling under the windows of the question if the mysql gem version libmysql ...

  • Workspace run under different Eclipse

    Now do live more and more often required to use eclipse in java and ruby & rails project conducted between the tangential shear from the past, because in the rails project used a coloring Aptana preferences, the results open the java project sour ...

  • Oracle instant clent for ruby / rails on cygwin

    Environment: XP: oracle full client, ruby, rails, gem cygwin: ruby rails, gem (the version with the XP version) Needs: for cygwin is installed under the rails platform support oci Steps: <1> download oracle instant client (10.2.0.3 Instant Client Pa

  • Struts2 + hibernate + spring problem user log in

    dao layer services layer action jsp <tr> <td align="center"> <b> user name: </ b> </ td> <td> <s: textfield name = "czyNumber" cssClass = "textstyle" theme = "simple" size = &q

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries