`
sillycat
  • 浏览: 2543537 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Linux Deploy Rails3 with Ruby1.9.2(3)

阅读更多
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/

分享到:
评论

相关推荐

    linuxdeploy-2.6.0-259.apk

    安卓平台虚拟机,最新版下载地址:...linuxdeploy-2.6.0-259.apk 为目前最新版(2020-02-01更新),最低支持Android 5.0。Android 4.4 支持版本:https://download.csdn.net/download/zhyjie100/12254490。

    Linux Deploy.zip

    Linux Deploy是一款专为Android设备设计的应用程序,它允许用户在Android设备上部署并运行Linux发行版,无需root权限。这个工具对于开发者、系统管理员或对Linux感兴趣的用户来说,是一个非常实用的工具,因为它使得...

    linuxdeploy

    linuxdeploy

    linuxdeploy-2.5.1-257.apk和linuxdeploy-2.6.0-259 .apk

    3. **运行linuxdeploy**:指定目标应用程序的路径,运行linuxdeploy,它会自动处理依赖并创建AppImage。 4. **测试AppImage**:生成后,可以在目标系统上运行AppImage,验证其是否正常工作。 总的来说,Linuxdeploy...

    linuxdeploy-x86_64.AppImage

    linux下的程序,打包为.AppImage

    linuxdeploy,在android上安装并运行gnu/linux.zip

    3. **编译或安装Linuxdeploy**:在Termux环境中,使用编译工具链(如Android NDK)编译Linuxdeploy源代码,或者直接下载预编译的二进制文件。这一步可能需要一些Android开发知识和设备的root权限。 4. **配置Linux...

    Linux Deploy安装包 2.6版本

    可用于手机安装Linux环境 供无法使用Play商店小伙伴下载

    Android-linuxdeploy.zip

    Android-linuxdeploy.zip,在android上安装并运行gnu/linux,安卓系统是谷歌在2008年设计和制造的。操作系统主要写在爪哇,C和C 的核心组件。它是在linux内核之上构建的,具有安全性优势。

    Linux deploy 32位系统 怎么安装宝塔怎么安装linux系统安装宝塔后搭建网站

    【Linux Deploy 安装与使用详解】 Linux Deploy是一款在Android设备上部署Linux系统的应用程序,它允许用户在手机或平板电脑上运行Linux发行版,如CentOS7。在32位的Linux系统上安装宝塔面板,可以实现轻量级的...

    linuxdeploy-2.1.0-237.apk

    When you install Linux on the flash card with the FAT32 file system, the image size should not exceed 4095 MB! After the initial setup the password for SSH and VNC generated automatically. The ...

    install-linuxdeploy-action:github运行linuxdeploy的动作

    install-linuxdeploy-action 在Github Actions工作流程上安装LinuxDeploy的操作。 请参阅LinuxDeploy主页上的linuxdeploy实用程序详细信息。 该操作可以处理LinuxDeploy的插件。 您可以指定插件和要安装的目标目录...

    kali-armhf-rootfs-linuxdeploy2.02-223.tar.gz rootfs 离线镜像安装包

    1.2020年6月4日09:27:41 积分调整1 ...linuxdeploy2.02-223.备份的离线镜像。可直接导入 kali-armhf aarch64 这个好像是32位的 如果需要安装jdk,直达https://download.csdn.net/download/zl20110000/11173517

    jdk-8u211-linux-arm64-vfp-hflt.tar.gz aarch64 chroot linuxdeploy 64位linux

    描述中提到,这个JDK可以用于"linuxdeploy"工具,这是一个用于构建和部署Linux应用程序容器的工具,特别适合于在aarch64架构的ARM设备上,比如手机。"已验证centos7 aarch64可用"意味着这个JDK已经在CentOS 7的64位...

    Deploy Rails Application

    Rails 经典开发参考书, Ruby on rails 系近年来在西方日渐盛行的一套网页开发工具,其高度集成化时开发时间大大缩短.

    Android-x86 Linux Deploy 部署1

    3. 使用Linux Deploy进行配置,选择Ubuntu作为发行版,版本可以是trusty(14.04)或xenial(16.04),架构选为amd64。设置镜像源为中国的镜像服务器,如http://mirrors.ustc.edu.cn/ubuntu/。 4. 指定安装路径,可以...

    Linux Deploy_2.5.0.apk

    Linux Deploy_2.5.0.apk

    linuxdeploy-cli:Linux部署CLI

    linuxdeploy-cli:Linux部署CLI

    linuxdeploy:AppDir创建和维护工具。 具有灵活的插件系统

    Linuxdeploy是一款强大的开源工具,主要用于在Linux环境下创建和维护AppDir。AppDir是一种特殊目录结构,它可以包含一个应用程序的所有依赖,使得该应用可以无需安装在任何特定Linux发行版上即可运行,极大地提升了...

    655137293901643必须1 linuxdeploy-1.apk

    655137293901643必须1 linuxdeploy-1.apk

Global site tag (gtag.js) - Google Analytics