分页: 1 / 1

[问题]郁闷呀,使用rails出现下面提示,貌似大伙都比较顺利没有出现俺类似的错误。

发表于 : 2008-05-25 11:40
themyth
郑重声明:俺是菜鸟,学习rails纯粹是兴趣,如有雷同纯属巧合。
但是对俺打击也太大了,连续在几种linux环境下安装都不成功。
两个星期了,找了n多个论坛,第一次rails demo 执行完毕后,以下是提示:
-----------郁闷的分割线-----------
themyth@themyth:~$ ruby -v
ruby 1.9.0 (2007-12-25 revision 14709) [i686-linux]
themyth@themyth:~$ gem -v
1.1.1
themyth@themyth:~$ rails -v
Rails 2.0.2
themyth@themyth:~$ cd work
themyth@themyth:~/work$ sudo rails depot
[sudo] password for themyth:
can't convert Enumerable::Enumerator into Array #介个是什么意思?
themyth@themyth:~/work$ cd demo
themyth@themyth:~/work/demo$ ls
app db lib public README test vendor config doc log Rakefile script tmp
themyth@themyth:~/work/demo$ ruby script/server
/home/themyth/work/demo/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb:3:in `require': no such file to load -- base64 (LoadError)
from /home/themyth/work/demo/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb:3:in `<top (required)>'
from /home/themyth/work/demo/vendor/rails/activesupport/lib/active_support/core_ext/hash.rb:2:in `require'
from /home/themyth/work/demo/vendor/rails/activesupport/lib/active_support/core_ext/hash.rb:2:in `block in <top (required)>'
from /home/themyth/work/demo/vendor/rails/activesupport/lib/active_support/core_ext/hash.rb:1:in `each'
from /home/themyth/work/demo/vendor/rails/activesupport/lib/active_support/core_ext/hash.rb:1:in `<top (required)>'
from /home/themyth/work/demo/vendor/rails/activesupport/lib/active_support/core_ext.rb:3:in `require'
from /home/themyth/work/demo/vendor/rails/activesupport/lib/active_support/core_ext.rb:3:in `block in <top (required)>'
from /home/themyth/work/demo/vendor/rails/activesupport/lib/active_support/core_ext.rb:1:in `each'
from /home/themyth/work/demo/vendor/rails/activesupport/lib/active_support/core_ext.rb:1:in `<top (required)>'
from /home/themyth/work/demo/vendor/rails/activesupport/lib/active_support.rb:30:in `require'
from /home/themyth/work/demo/vendor/rails/activesupport/lib/active_support.rb:30:in `<top (required)>'
from /home/themyth/work/demo/vendor/rails/railties/lib/commands/server.rb:1:in `require'
from /home/themyth/work/demo/vendor/rails/railties/lib/commands/server.rb:1:in `<top (required)>'
from script/server:3:in `require'
from script/server:3:in `<main>
'
themyth@themyth:~/work/demo$
-是的,当时的情况就是这样-----------



我的profile有加以下:
-------------
RUBY_HOME=/usr/local/bin/ruby
PATH="${RUBY_HOME}"/bin:"${JAVA_HOME}"/bin:/usr/local/mysql/bin:"${PATH}"
export PATH
------------------
-------------

发表于 : 2008-05-26 22:10
themyth
还是没有人理我,好几天了,还是解决不了问题,肯定哪里一个很简单的地方没有搞懂。
大侠,救命!!

发表于 : 2008-06-30 17:39
18106127
唉 貌似我连rails 都没装成。。 非常郁闷 在学习RUBY中

安装Ruby&Rails

发表于 : 2008-07-20 2:04
toawinner47
1. Rails的框架是基于Ruby语言的,就像Struts框架是基于Java一样,所以先去下载Ruby安装包,http://rubyinstaller.rubyforge.org。也可以在ubuntu中用打开终端输入命令:

代码: 全选

sudo apt-get install ruby
接着安装Rails:

代码: 全选

sudo apt-get install rails

代码: 全选

sudo apt-get install libapache2-mod-ruby libapache2-mod-fcgid libfcgi-ruby1.8 libmocha-ruby1.8

代码: 全选

sudo apt-get install mongrel

代码: 全选

 mkdir /home/hbs/work

代码: 全选

cd /home/hbs/work

代码: 全选

rails demo

代码: 全选

 cd demo/script

代码: 全选

./server webrick
图片
2.访问web页面

如上图图中的第三行告诉我们rails的web服务端口号是3000,访问地址为http://127.0.0.1:3000

如果访问成功会得到如下画面:
图片

发表于 : 2008-07-20 3:50
toawinner47
经典Helloworld

发表于 : 2008-07-20 9:05
karron
rails 要使用官方的, 不要用ubuntu源里面的.

另外, 不要随便使用sudo.
sudo rails depot 这句话是明显错误的. 在自己目录里面不要使用sudo.