首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Debian压缩64位上安装Webistrano

Debian压缩64位上安装Webistrano
EN

Stack Overflow用户
提问于 2012-10-01 15:39:42
回答 1查看 922关注 0票数 2

我目前正在尝试在刚刚安装的debian压缩64位上安装Webistrano,但是我面临着一些我无法解决的问题。

注意:这台机器是在Xen环境下创建的,我不认为这会影响程序,但是提到它似乎很重要。

程序:

信息:

  • Ruby版本:ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
  • Rails版本:`Rails 2.3.11
  • 带有:/usr/lib/ruby/1.8:/var/lib/gems/1.8/bin的路径修饰符
  • Rails env:开发
  • 已经建立了数据库
  • 我认为webistrano的数据库设置是正确的(user/pass/path_to_sock_file)

所以,我就是这样做的:

我首先安装了用于此类安装的“基本”包:

代码语言:javascript
复制
# apt-get install build-essential ruby rubygems libmysql-ruby libmysqlclient-dev libdbd-mysql-ruby mysql-server unzip rake

然后,我一直在下载该项目并将其解压缩到/usr/src中。在复制和配置了电子邮件/数据库设置文件(如https://github.com/peritor/webistrano所建议的)之后,我继续安装项目所需的所有gems:

代码语言:javascript
复制
bundle install

此时,命令被卡住了,一个小时内什么也不做。

我知道如果Gemfile是复杂的,它可能会发生,但对我来说似乎并非如此。(请参阅下面的Gemfile )

代码语言:javascript
复制
# cat Gemfile
source "http://rubygems.org"

gem 'bundler', "~>1.0.10"
gem "rails", "2.3.11"
gem "mysql"
gem "erubis"
gem "rake"
gem "syntax", "1.0.0"
gem "capistrano", "2.6.0"
gem "open4", "0.9.3"
gem "exception_notification", "2.3.3.0"

group :test do
  gem "mocha", "0.9.8"
end

因此,我决定继续下去,亲手安装了宝石,一旦完成,就会:

代码语言:javascript
复制
# gem list *gems of Gemfile*
bundler (1.0.10)
rails (2.3.11)
mysql (2.8.1)
erubis (2.7.0)
rake (0.9.2.2)
syntax (1.0.0)
capistrano (2.6.0)
open4 (0.9.3)
exception_notification (2.3.3.0)
mocha (0.9.8)

因此,我认为一切都应该正常运行,而不必运行:bundle install

这就是我最后尝试用rake创建数据库结构的原因:

代码语言:javascript
复制
# rake db:migrate --trace
(in /usr/src/peritor-webistrano-a98ba6b)
rake aborted!
Bundler couldn't find some gems.Did you run `bundle install`?
/usr/src/peritor-webistrano-a98ba6b/config/../config/preinitializer.rb:18
/usr/src/peritor-webistrano-a98ba6b/config/boot.rb:28:in `load'
/usr/src/peritor-webistrano-a98ba6b/config/boot.rb:28:in `preinitialize'
/usr/src/peritor-webistrano-a98ba6b/config/boot.rb:10:in `boot!'
/usr/src/peritor-webistrano-a98ba6b/config/boot.rb:123
/usr/src/peritor-webistrano-a98ba6b/Rakefile:4:in `require'
/usr/src/peritor-webistrano-a98ba6b/Rakefile:4
/usr/lib/ruby/1.8/rake.rb:2383:in `load'
/usr/lib/ruby/1.8/rake.rb:2383:in `raw_load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2017:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2016:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2000:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28

根据rake错误消息,显然有些宝石没有正确安装,这看起来很奇怪,但我想他找不到它。

因此,我再次检查了bundle工具:

代码语言:javascript
复制
# bundle check
Your Gemfile's dependencies could not be satisfied
Install missing gems with `bundle install`
# bundle show
Could not find gem 'mocha (= 0.9.8, runtime)' in any of the gem sources listed in your Gemfile.

我被困在这里,我只是不知道该怎么继续。我搜索有关摩卡或宝石文件的问题,但没有发现太多的相关。

我希望一切都清楚易懂,因为这是我的第一篇帖子。

谢谢你的回复/提示,如果我能进步的话,我会尽力让你跟上的!

EN

回答 1

Stack Overflow用户

发布于 2013-12-08 19:28:40

检查以下说明:http://www.gogolek.co.uk/blog/2012/10/web-application-deployment-webistrano-capistrano/

此外,我在干净的debian 6 64位上安装mysql gem时遇到了问题,所以我不得不运行

代码语言:javascript
复制
$ apt-get install libmysqlclient-dev ruby-dev 

最后,我安装了以下gems

代码语言:javascript
复制
Using rake (0.8.7) 
Using activesupport (2.3.11) 
Using rack (1.1.6) 
Using actionpack (2.3.11) 
Using actionmailer (2.3.11) 
Using activerecord (2.3.11) 
Using activeresource (2.3.11) 
Using bundler (1.0.10) 
Using highline (1.6.20) 
Using net-ssh (2.7.0) 
Using net-scp (1.1.2) 
Using net-sftp (2.1.2) 
Using net-ssh-gateway (1.2.0) 
Using capistrano (2.6.0) 
Using erubis (2.7.0) 
Using exception_notification (2.3.3.0) 
Using mocha (0.9.8) 
Installing mysql (2.9.1) with native extensions 
Installing open4 (0.9.3) 
Installing rails (2.3.11) 
Installing syntax (1.0.0) 
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem is installed.
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12676485

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档