小牙兔 2011-12-11 22:41
浏览 583
已采纳

因安装开源ruby项目zheye,需要特定的ruby1.9.2等环境,但gem源里只有低版本,有没有什么办法解决本地安装rails3的依赖问题或如何更新gem源

事实上,是因为我要安装一个ruby的环境来安装一款开源软件zheye。需要的环境ruby1.9.2是必须版本,以下是所需要的一些环境,及我的安装过程和结果。如果可以,请帮忙诊断一下。由于所需要的版本都不是源里有的。所以只能下载了源码包在本地编译安装。

最后安装完rails后访问http://127.0.0.1:3000,显示找不到页面,不知道什么原因,请帮忙。 相关环境已经安装如下(均为编译安装,并且无出错) 不知道问题出现在哪里

ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]

mongo --version
MongoDB shell version: 1.6.3

redis-server -v
Redis server version 2.2.2 (00000000:0)

node hellonode.js(测试js) =========================================================== var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello Node.jsn'); }).listen(8124, "127.0.0.1"); console.log('Server running at http://127.0.0.1:8124/'); =========================================================== 结果:Server running at http://127.0.0.1:8124/

sudo service redis-server start

Starting redis-server: [8195] 07 Dec 18:48:34 * Server started, Redis version 2.2.2 [8195] 07 Dec 18:48:34 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. [8195] 07 Dec 18:48:34 * The server is now ready to accept connections on port 8379 [8195] 07 Dec 18:48:34 - 0 clients connected (0 slaves), 539440 bytes in use [8195] 07 Dec 18:48:39 - 0 clients connected (0 slaves), 539440 bytes in use

 >sudo start mongodb
start: Job is already running: mongodb

rails s 正常 (本地编译安装因依赖太多,所以只好从源里安装,而后果就是又安装了ruby1.8,不在符合系统要求,但毕竟可以往下走)

需要说明的地方 ============================================================
1.在安装bundle install --path vendor/bundle时,总是提示rake-0.9.2在源中找不到(bundle的安装过程中总是有一步,feching source index from rubygems.org)。所以,我单独下载安装了rake0.9.2。并且修改了 /usr/local/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/spec_set.rb 注释掉了raise GemNotFound, "Could not find #{s.full_name} in any of the sources" unless spec 得以进行后续安装。

2.安装rails时,用的是sudo apt-get install rails。而后执行rails s未报错 但
$ rake mongoid_sphinx:configure
$ rake mongoid_sphinx:index
$ rake mongoid_sphinx:start这几步没能成功进行,提示类似如下
 rake aborted! no such file to load -- action_controller/railtie

3.redis-server启动时总是提示端口占用,因此我修改了端口到8379

  • 写回答

3条回答 默认 最新

  • cutdeer 2011-12-13 19:41
    关注

    有抽风一说

    国内有时可以直接访问 但经常安装到一半就断了

    用VPN了 速度快 从来没有出现的安装中断过

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 Matlab问题解答有两个问题
  • ¥50 Oracle Kubernetes服务器集群主节点无法访问,工作节点可以访问
  • ¥15 LCD12864中文显示
  • ¥15 在使用CH341SER.EXE时不小心把所有驱动文件删除了怎么解决
  • ¥15 gsoap生成onvif框架
  • ¥15 有关sql server business intellige安装,包括SSDT、SSMS。
  • ¥15 stm32的can接口不能收发数据
  • ¥15 目标检测算法移植到arm开发板
  • ¥15 利用JD51设计温度报警系统
  • ¥15 快手联盟怎么快速的跑出建立模型