作为一个更大项目的一部分,我的任务是迁移一些现有的 Ruby on Rails 站点(使用旧版本的 refinerycms 0.9.6.34 构建,至少是源代码中包含的 Gemfile 中列出的版本)。我通常不使用 Ruby,所以我有点茫然。之前的开发者只是简单地交出了最新的 git dump 和一个 db dump。
我首先尝试让网站在 Ubuntu 11.10 本地机器上本地运行,然后再推送到测试 Heroku 安装。如果可以直接将他们提供的文件推送到 Heroku,那么我可以尝试,但我的理解是我需要让一切正常工作,然后使用 Heroku 的工具进行部署。
以前的开发人员说他们使用的是 ruby 1.8.7,所以在 Ubuntu 中我做了以下事情:
aptitude install ruby1.8 ruby1.8-dev ruby1.8-full
aptitude install rubygems1.8
我已经恢复了数据库,并在 config 目录中对 database.yml 进行了更改以指向恢复的数据库。
当我尝试从提取的源目录的根目录运行“捆绑安装”时,我得到:
Invalid gemspec in [/var/lib/gems/1.8/specifications/mail-2.4.4.gemspec]: invalid date format in specification: "2012-03-14 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/mime-types-1.18.gemspec]: invalid date format in specification: "2012-03-21 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/sass-rails-3.2.5.gemspec]: invalid date format in specification: "2012-03-19 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/jquery-rails-2.0.2.gemspec]: invalid date format in specification: "2012-04-03 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/mail-2.4.4.gemspec]: invalid date format in specification: "2012-03-14 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/mime-types-1.18.gemspec]: invalid date format in specification: "2012-03-21 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/sass-rails-3.2.5.gemspec]: invalid date format in specification: "2012-03-19 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/jquery-rails-2.0.2.gemspec]: invalid date format in specification: "2012-04-03 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/mail-2.4.4.gemspec]: invalid date format in specification: "2012-03-14 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/mime-types-1.18.gemspec]: invalid date format in specification: "2012-03-21 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/sass-rails-3.2.5.gemspec]: invalid date format in specification: "2012-03-19 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/jquery-rails-2.0.2.gemspec]: invalid date format in specification: "2012-04-03 00:00:00.000000000Z"
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.3.6)
Using activesupport (3.2.3)
Using builder (3.0.0)
Using activemodel (3.2.3)
Using erubis (2.7.0)
Using journey (1.0.3)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.1)
Using hike (1.2.1)
Installing tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.3)
Installing mime-types (1.18)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Installing mail (2.4.4)
Using actionmailer (3.2.3)
Using arel (3.0.2)
Using tzinfo (0.3.33)
Using activerecord (3.2.3)
Using activeresource (3.2.3)
Using acts_as_indexed (0.7.8)
Using awesome_nested_set (2.1.3)
Using babosa (0.3.7)
Using bcrypt-ruby (3.0.1)
Using coffee-script-source (1.3.3)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.7.3)
Using rdoc (3.12)
Using thor (0.14.6)
Using railties (3.2.3)
Using coffee-rails (3.2.2)
Using orm_adapter (0.0.7)
Using warden (1.1.1)
Using devise (2.0.4)
Using dragonfly (0.9.12)
Using friendly_id (4.0.6)
Using paper_trail (2.6.3)
Using globalize3 (0.2.0)
Installing jquery-rails (2.0.2)
Using bundler (1.1.4)
Using rails (3.2.3)
Using sass (3.1.19)
Installing sass-rails (3.2.5)
Using truncate_html (0.5.5)
Using uglifier (1.2.4)
Using will_paginate (3.0.3)
Using refinerycms-core (2.0.4)
Using refinerycms-authentication (2.0.4)
Using refinerycms-dashboard (2.0.4)
Using refinerycms-images (2.0.4)
Using seo_meta (1.3.0)
Using refinerycms-pages (2.0.4)
Using refinerycms-resources (2.0.4)
Using refinerycms (2.0.4)
Using routing-filter (0.3.1)
Using refinerycms-i18n (2.0.0)
Using sqlite3 (1.3.6)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
显然,需要解决 Invalid gemspec 的错误,但令我困扰的另一件事是以下几行:
Using refinerycms-core (2.0.4)
Using refinerycms-authentication (2.0.4)
Using refinerycms-dashboard (2.0.4)
Using refinerycms-images (2.0.4)
Using seo_meta (1.3.0)
Using refinerycms-pages (2.0.4)
Using refinerycms-resources (2.0.4)
Using refinerycms (2.0.4)
Using routing-filter (0.3.1)
Using refinerycms-i18n (2.0.0)
由于 Gemfile 中列出的炼油厂cms 版本是 0.9.6.34。
当谈到 Ruby 世界时,我有点迷茫,所以任何帮助都将不胜感激。
谢谢,
更新 根据要求,gemfile 看起来像:
source 'http://rubygems.org'
gem 'refinerycms', '= 0.9.6.34'
gem 'rails', '~> 2.3.14'
gem 'mysql2', '~> 0.2.18'
gem 'hpricot'
gem 'rmagick', '= 2.12.2'
此外,这是 Gemfile.lock 文件中的内容:
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.3)
actionpack (= 4.2.3)
mail (~> 2.4.4)
actionpack (3.2.3)
activemodel (= 3.2.3)
activesupport (= 3.2.3)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.1)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.1.2)
activemodel (3.2.3)
activesupport (= 3.2.3)
builder (~> 3.0.0)
activerecord (3.2.3)
activemodel (= 3.2.3)
activesupport (= 3.2.3)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.3)
activemodel (= 3.2.3)
activesupport (= 3.2.3)
activesupport (3.2.3)
i18n (~> 0.6)
multi_json (~> 1.0)
acts_as_indexed (0.7.8)
arel (3.0.2)
awesome_nested_set (2.1.3)
activerecord (>= 3.0.0)
babosa (0.3.7)
bcrypt-ruby (3.0.1)
builder (3.0.0)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.3.3)
devise (2.0.4)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
railties (~> 3.1)
warden (~> 1.1.1)
dragonfly (0.9.12)
rack
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
friendly_id (4.0.6)
globalize3 (0.2.0)
activemodel (>= 3.0.0)
activerecord (>= 3.0.0)
paper_trail (~> 2)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.3)
jquery-rails (2.0.2)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
json (1.7.3)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.18)
multi_json (1.3.6)
orm_adapter (0.0.7)
paper_trail (2.6.3)
activerecord (~> 3.0)
railties (~> 3.0)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.2.3)
actionmailer (= 3.2.3)
actionpack (= 3.2.3)
activerecord (= 3.2.3)
activeresource (= 3.2.3)
activesupport (= 3.2.3)
bundler (~> 1.0)
railties (= 3.2.3)
railties (3.2.3)
actionpack (= 3.2.3)
activesupport (= 3.2.3)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
refinerycms (2.0.4)
bundler (~> 1.0)
refinerycms-authentication (= 2.0.4)
refinerycms-core (= 2.0.4)
refinerycms-dashboard (= 2.0.4)
refinerycms-images (= 2.0.4)
refinerycms-pages (= 2.0.4)
refinerycms-resources (= 2.0.4)
refinerycms-authentication (2.0.4)
devise (~> 2.0.0)
orm_adapter (~> 0.0.7)
refinerycms-core (= 2.0.4)
refinerycms-core (2.0.4)
acts_as_indexed (~> 0.7.7)
awesome_nested_set (~> 2.1.3)
coffee-rails (~> 3.2.1)
friendly_id (~> 4.0.1)
globalize3 (~> 0.2.0)
jquery-rails (~> 2.0.0)
rails (>= 3.1.3, < 3.3)
sass-rails (~> 3.2.3)
truncate_html (~> 0.5)
uglifier (>= 1.0.3)
will_paginate (~> 3.0.2)
refinerycms-dashboard (2.0.4)
refinerycms-core (= 2.0.4)
refinerycms-i18n (2.0.0)
refinerycms-core (~> 2.0.0)
routing-filter (>= 0.2.3)
refinerycms-images (2.0.4)
dragonfly (~> 0.9.8)
rack-cache (>= 0.5.3)
refinerycms-core (= 2.0.4)
refinerycms-pages (2.0.4)
awesome_nested_set (~> 2.1.3)
babosa (!= 0.3.6)
refinerycms-core (= 2.0.4)
seo_meta (~> 1.3.0)
refinerycms-resources (2.0.4)
dragonfly (~> 0.9.8)
rack-cache (>= 0.5.3)
refinerycms-core (= 2.0.4)
routing-filter (0.3.1)
actionpack
sass (3.1.19)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
seo_meta (1.3.0)
railties (>= 3.0.0)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
truncate_html (0.5.5)
tzinfo (0.3.33)
uglifier (1.2.4)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
warden (1.1.1)
rack (>= 1.0)
will_paginate (3.0.3)
PLATFORMS
ruby
DEPENDENCIES
coffee-rails (~> 3.2.1)
jquery-rails
rails (= 3.2.3)
refinerycms (~> 2.0.0)
refinerycms-i18n (~> 2.0.0)
sass-rails (~> 3.2.3)
sqlite3
uglifier (>= 1.0.3)