开发者

Can't install Webiva using RVM

I'm trying to install Webiva (a Rails CMS)

I’m using RVM to manage my Ruby versions, I currently have 1.8.7 and 1.9.2 on Ubuntu 10.04 (I'm pretty new at Linux, so don't be too hard on me =P)

I've been following this tutorial. To install Webiva I need to run ./script/quick_install.rb, but it fails throwing the following

<internal:lib/rubygems/custom_require>:29:in `require’: no such file to load — sha1 (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require’
from ./script/quick_install.rb:3:in `<main>’

I believe is because I have ruby and rubygems installed in my home folder (because of RVM).

Any idea of how can I install Webiva anyway? Probably I need to modify that script to point to the right place where Ruby is installed. But don't know how really...

Here are the first lines of the script:

#!/usr/bin/env ruby

requ开发者_JAVA技巧ire 'sha1'
require 'base64'
require 'fileutils'
require 'yaml'
require 'rubygems'
require 'memcache'

RAILS_ROOT = File.dirname(__FILE__) + "/.."

def run_db_command(command,use_db=true)
     if use_db
       system("mysql",'-u',@username,"--password=#{@pw}","--host=#{@db_host}","--port=#{@db_port}",'-e',command,@db_name)
     else
       system("mysql",'-u',@username,"--password=#{@pw}","--host=#{@db_host}","--port=#{@db_port}",'-e',command)
     end
end


class WebivaQuickInstall
...

And here is the full source

Thanks


In rvm, certain modules like Readline and OpenSSL aren't compiled into ruby by default. These must be installed as modules after you run the rvm installer. The missing sha1 library is provided by OpenSSL, so you should install the OpenSSL ruby extension.

You can find the files in /home/<user>/.rvm/<ruby_version>/ext/openssl. Run the following two commands in that directory:

ruby extconf.rb
make install

Assuming you have the proper development libraries for OpenSSL, this will configure the ruby extension and you'll be able to continue with the install. If the first step produces errors, then you'll need to grab the OpenSSL development libraries from your package manager. If I remember correctly from my own experience, that package is named openssl-devel.


I've ended using the ubuntu installer script from /doc dir.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜