2012-10-01 117 views
2

我目前正试图在新安装的debian上安装Webistrano 64bits,但我遇到了一些我无法解决的问题。在Debian上安装Webistrano 64bits

注意:该机器是在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是,我认为正确的(用户名/密码/ path_to_sock_file)

所以,这里是我做过什么:

我第一次安装了“基础知识'这样的安装包:

# apt-get install build-essential ruby rubygems libmysql-ruby libmysqlclient-dev libdbd-mysql-ruby mysql-server unzip rake 

然后,我一直在下载和解压项目到/ usr/src。复制和配置电子邮件/ databses设置文件(由https://github.com/peritor/webistrano的建议)之后,我继续通过安装项目所需的所有宝石:

bundle install 

在这一点上,该命令被卡住,而不是做任何一个小时。

我知道如果Gemfile很复杂,会发生这种情况,但对我来说似乎并不是这样。 (见的Gemfile以下)

# 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 

所以决定继续我的手,这一次完成安装宝石给出:

# 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 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 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. 

而且我坚持在这里,我只是不知道如何继续。 我谷歌约摩卡或gemfile问题,但没有发现太多相关。

我希望一切都清晰易懂,因为这是我的第一篇文章。

感谢您的任何回复/提示,如果我设法发展,我会尽量让你保持最新!

回答

0

检查这些指令: http://www.gogolek.co.uk/blog/2012/10/web-application-deployment-webistrano-capistrano/

另外我有mysql的宝石安装问题我干净的debian 6 64位,所以我只好跑

$ apt-get install libmysqlclient-dev ruby-dev 

我结束了与安装下列宝石

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.