两个版本的宝石在生产轨道部署 [英] Two versions of gems in production rails deployment
问题描述
开发
actionmailer(3.2.3)
actionpack(3.2.3)
activemodel(3.2.3)
activerecord(3.2.3)
activeresource(3.2.3)
activesupport(3.2.3)
arel(3.0.2)
bcrypt-ruby(3.0.1)
builder(3.0.4)
bundler(1.3.4)
capistrano(2.14.2,2.12.0)
climate_control 0.0.3)
可卡因(0.5.1,0.2.1)
咖啡轨道(3.2.2)
咖啡脚本(2.2.0)
coffee-script-来源(1.6.2,1.3.3)
commonjs(0.2.6)
daemon_controller(1.1.2,1.0.0)
守护进程(1.1.9)
database_cleaner 0.9.1,0.8.0)
devise(2.2.3)
diff-lcs(1.2.2,1.1.3)
erubis(2.7.0)
eventmachine 1.0.0)
execjs(1.4.0)
fastthread(1.0.7)
ffi(1.6.0,1.3.1)
font-awesome-rails(3.0。 2.0)
highlin e(1.6.16,1.6.13)
徒步旅行(1.2.1)
i18n(0.6.4,0.6.1)
旅程(1.0.4)
jquery- (2.2.1,2.0.2)
json(1.7.7,1.7.6)
少(2.3.1,2.2.1)
less-rails(2.3.2, 2.2.3)
libv8(3.11.8.17 x86_64-linux,3.3.10.4 x86_64-linux)
listen(0.7.3,0.7.2)
mail(2.4.4)
mime类型(1.22,1.19)
multi_json(1.7.2,1.5.0)
mysql2(0.3.11)
nested_form(0.3.1,0.3.0)
net-scp(1.1.0,1.0.4)
net-sftp(2.1.1,2.0.5)
net-ssh(2.6.6,2.5.2)
net-ssh-gateway(1.2.0,1.1.0)
orm_adapter(0.4.0)
回形针(3.4.1,3.1.4)
乘客(3.0.19,3.0。 14)
polyglot(0.3.3)
机架(1.4.5,1.4.4)
机架缓存(1.2)
rack-ssl(1.3.3)
机架测试(0.6.2)
轨道(3.2.3)
轨道(3.2.3)
rake(10.0.4,10.0.3)
rb- inotify(0.9.0,0.8.8)
rb-readline(0.4.2)
rdoc(3.12.2,3.12)
ref(1.0.4)
rmagick( 2.13.2,2.13.1)
rspec(2.11.0)
rspec-core(2.13.1,2.11.1)
rspec-expe (2.13.0,2.11.1)
rspec-mocks(2.13.0,2.11.1)
rspec-rails(2.13.0,2.11.0)
rubygems-bundler( 1.1.1)
rvm(1.11.3.6)
sass(3.2.7,3.1.20)
sass-rails(3.2.6,3.2.5)
链轮2.1.3)
therubyracer(0.11.4,0.10.1)
thor(0.14.6)
tilt(1.3.6,1.3.3)
treetop(1.4。 12,1.4.10)
twitter-bootstrap-rails(2.2.6,2.1.1)
tzinfo(0.3.37,0.3.33)
uglifier(1.3.0,1.2。 6)
warden(1.2.1)
will_paginate(3.0.4)
生产
actionmailer(3.2.3)
actionpack(3.2.3)
activemodel(3.2。 3)
activerecord(3.2.3)
activeresource(3.2.3)
activesupport(3.2.3)
arel(3.0.2)
bcrypt-ruby 3.0.1)
生成器(3.0.4)
bundler(1.1.4,1.1.3)
capistrano(2.12.0)
可卡因(0.2.1)
咖啡轨道(3.2.2)
咖啡脚本(2.2.0)
咖啡脚本源(1.3.3)
commonjs(0.2.6)
daemon_controller(1.0.0)
守护进程(1.1 .9)
database_cleaner(0.8.0)
devise(2.2.3)
diff-lcs(1.1.3)
erubis(2.7.0)
eventmachine (1.0.0)
execjs(1.4.0)
fastthread(1.0.7)
ffi(1.3.1)
font-awesome-rails(3.0.2.0)
高线(1.6.13)
远足(1.2.1)
i18n(0.6.1)
旅程(1.0.4)
jquery-rails(2.0.2 )
json(1.7.6)
less(2.2.1)
less-rails(2.2.3)
libv8(3.3.10.4 x86_64-linux)
听(0.7.2)
邮件(2.4.4)
mime类型(1.19)
multi_json(1.5.0)
mysql2(0.3.11)
nested_form(0.3.0)
net-scp(1.0.4)
net-sftp(2.0.5)
net-ssh(2.5.2)
net-ssh-网关(1.1.0)
orm_adapter(0.4.0)
回形针(3.1.4)
乘客(3.0.14)
pg(0.14.1)
多口(0.3.3)
机架(1.4.4)
机架缓存(1.2)
rack-ssl(1.3.3)
机架测试(0.6.2)
rails(3.2.3)
railties(3.2.3)
rake(10.0.3,0.9.2.2)
rb-inotify(0.8.8)
rb-readline(0.4.2)
rdoc(3.12)
rmagick(2.13.1)
rspec(2.11.0)
rspec-core(2.11.1)
rspec-expectations(2.11.1)
rspec-mocks(2.11.1)
rspec-rails
rubygems-bundler(1.0.3,1.0.2)
rvm(1.11.3.5,1.11.3.3)
sass(3.1.20)
sass-轨道(3.2.5)
链轮(2.1.3)
therubyracer(0.10.1)
thin(1.5.0)
thor(0.14.6)
(1.3.3)
treetop(1.4.10)
twitter-bootstrap-rails(2.1.1)
tzinfo(0.3.33)
uglifier(1.2.6)
warden(1.2.1)
Gemfile
源'https://rubygems.org'
gem'rails','3.2.3'
gem'mysql2'
#Devise Gem
宝石devise,〜> 2.2.3
#上传文件
gempaperclip,〜> 3.0
gem'rmagick'
#Nested Form
gemnested_form
#need this for rails 3
gem'rb -readline'
#Pagination
gem'will_paginate','〜> 3.0.0'
#仅用于资产且不需要的宝石
#在生产环境中默认为
group:assets do
gem'sass-rails','〜> 3.2.3'
gem'coffee-rails','〜> 3.2.1'
gem'less-rails'
#请参阅https://github.com/sstephenson/execjs#readme以获取更多支持的运行时
#gem'therubyracer' ,:platform =>:ruby
gem'uglifier','> = 1.0.3'
end
#js东西:
gem'execjs'
gem'jquery-rails'
gem'twitter-bootstrap-rails'
gemfont-awesome-rails
#gem允许在ubuntu服务器上运行
gem'therubyracer'
group:development do
gem'rails-dev-boost',:git => 混帐://github.com/thedark一个/ rails-dev-boost.git',:require =>'rails_development_boost'
gem'rb-inotify','〜> 0.8.8'
end
组:test,:development do
gem'rspec-rails'
#adding数据库清理器用于测试
gem'database_cleaner'
end
#使用ActiveModel has_secure_password
#gem'bcrypt-ruby','〜> 3.0.0'
group:production do
gem'thin'
gem'pg'
end
#使用Capistrano部署
gem 'capistrano'
#run与乘客
宝石'乘客'
我遇到的问题是部署应用程序时找不到will_paginate gem。我说正确的是,我有两个gemsets试图在这里工作吗?我不太确定,不想搞砸我的生产环境,所以最好在这个方面获得一些建议。
如果正在您的机器的开发环境中工作,那么我认为您应该将Gemfile.lock与您的代码一起推送并部署应用程序。然后,您的生产环境中的捆绑安装也会安装与开发环境相同的宝石版本。
I think i have some issues with my gemfile in production, as it differs from my development, which i believe is causing my deployment (Capistrano) to fail, well at bundle install time at least
Development
actionmailer (3.2.3)
actionpack (3.2.3)
activemodel (3.2.3)
activerecord (3.2.3)
activeresource (3.2.3)
activesupport (3.2.3)
arel (3.0.2)
bcrypt-ruby (3.0.1)
builder (3.0.4)
bundler (1.3.4)
capistrano (2.14.2, 2.12.0)
climate_control (0.0.3)
cocaine (0.5.1, 0.2.1)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.6.2, 1.3.3)
commonjs (0.2.6)
daemon_controller (1.1.2, 1.0.0)
daemons (1.1.9)
database_cleaner (0.9.1, 0.8.0)
devise (2.2.3)
diff-lcs (1.2.2, 1.1.3)
erubis (2.7.0)
eventmachine (1.0.0)
execjs (1.4.0)
fastthread (1.0.7)
ffi (1.6.0, 1.3.1)
font-awesome-rails (3.0.2.0)
highline (1.6.16, 1.6.13)
hike (1.2.1)
i18n (0.6.4, 0.6.1)
journey (1.0.4)
jquery-rails (2.2.1, 2.0.2)
json (1.7.7, 1.7.6)
less (2.3.1, 2.2.1)
less-rails (2.3.2, 2.2.3)
libv8 (3.11.8.17 x86_64-linux, 3.3.10.4 x86_64-linux)
listen (0.7.3, 0.7.2)
mail (2.4.4)
mime-types (1.22, 1.19)
multi_json (1.7.2, 1.5.0)
mysql2 (0.3.11)
nested_form (0.3.1, 0.3.0)
net-scp (1.1.0, 1.0.4)
net-sftp (2.1.1, 2.0.5)
net-ssh (2.6.6, 2.5.2)
net-ssh-gateway (1.2.0, 1.1.0)
orm_adapter (0.4.0)
paperclip (3.4.1, 3.1.4)
passenger (3.0.19, 3.0.14)
polyglot (0.3.3)
rack (1.4.5, 1.4.4)
rack-cache (1.2)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.2.3)
railties (3.2.3)
rake (10.0.4, 10.0.3)
rb-inotify (0.9.0, 0.8.8)
rb-readline (0.4.2)
rdoc (3.12.2, 3.12)
ref (1.0.4)
rmagick (2.13.2, 2.13.1)
rspec (2.11.0)
rspec-core (2.13.1, 2.11.1)
rspec-expectations (2.13.0, 2.11.1)
rspec-mocks (2.13.0, 2.11.1)
rspec-rails (2.13.0, 2.11.0)
rubygems-bundler (1.1.1)
rvm (1.11.3.6)
sass (3.2.7, 3.1.20)
sass-rails (3.2.6, 3.2.5)
sprockets (2.1.3)
therubyracer (0.11.4, 0.10.1)
thor (0.14.6)
tilt (1.3.6, 1.3.3)
treetop (1.4.12, 1.4.10)
twitter-bootstrap-rails (2.2.6, 2.1.1)
tzinfo (0.3.37, 0.3.33)
uglifier (1.3.0, 1.2.6)
warden (1.2.1)
will_paginate (3.0.4)
Production
actionmailer (3.2.3)
actionpack (3.2.3)
activemodel (3.2.3)
activerecord (3.2.3)
activeresource (3.2.3)
activesupport (3.2.3)
arel (3.0.2)
bcrypt-ruby (3.0.1)
builder (3.0.4)
bundler (1.1.4, 1.1.3)
capistrano (2.12.0)
cocaine (0.2.1)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.3.3)
commonjs (0.2.6)
daemon_controller (1.0.0)
daemons (1.1.9)
database_cleaner (0.8.0)
devise (2.2.3)
diff-lcs (1.1.3)
erubis (2.7.0)
eventmachine (1.0.0)
execjs (1.4.0)
fastthread (1.0.7)
ffi (1.3.1)
font-awesome-rails (3.0.2.0)
highline (1.6.13)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.0.2)
json (1.7.6)
less (2.2.1)
less-rails (2.2.3)
libv8 (3.3.10.4 x86_64-linux)
listen (0.7.2)
mail (2.4.4)
mime-types (1.19)
multi_json (1.5.0)
mysql2 (0.3.11)
nested_form (0.3.0)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.5.2)
net-ssh-gateway (1.1.0)
orm_adapter (0.4.0)
paperclip (3.1.4)
passenger (3.0.14)
pg (0.14.1)
polyglot (0.3.3)
rack (1.4.4)
rack-cache (1.2)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.2.3)
railties (3.2.3)
rake (10.0.3, 0.9.2.2)
rb-inotify (0.8.8)
rb-readline (0.4.2)
rdoc (3.12)
rmagick (2.13.1)
rspec (2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.1)
rspec-mocks (2.11.1)
rspec-rails (2.11.0)
rubygems-bundler (1.0.3, 1.0.2)
rvm (1.11.3.5, 1.11.3.3)
sass (3.1.20)
sass-rails (3.2.5)
sprockets (2.1.3)
therubyracer (0.10.1)
thin (1.5.0)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
twitter-bootstrap-rails (2.1.1)
tzinfo (0.3.33)
uglifier (1.2.6)
warden (1.2.1)
Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'mysql2'
#Devise Gem
gem "devise", "~> 2.2.3"
#for uploading files
gem "paperclip", "~> 3.0"
gem 'rmagick'
#Nested Form
gem "nested_form"
#need this for rails 3
gem 'rb-readline'
#Pagination
gem 'will_paginate', '~> 3.0.0'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'less-rails'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platform => :ruby
gem 'uglifier', '>= 1.0.3'
end
#js stuff:
gem 'execjs'
gem 'jquery-rails'
gem 'twitter-bootstrap-rails'
gem "font-awesome-rails"
#gem to allow running on ubuntu server
gem 'therubyracer'
group :development do
gem 'rails-dev-boost', :git => 'git://github.com/thedarkone/rails-dev-boost.git', :require => 'rails_development_boost'
gem 'rb-inotify', '~> 0.8.8'
end
group :test, :development do
gem 'rspec-rails'
#adding database cleaner for tests
gem 'database_cleaner'
end
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
group :production do
gem 'thin'
gem 'pg'
end
# Deploy with Capistrano
gem 'capistrano'
#run with passenger
gem 'passenger'
The problem i am getting is when deploying the application cannot find the will_paginate gem. Am i correct in saying that it looks like i have two gemsets trying to work here? Im not quite sure, dont want to mess up my production environment so thought best to get some advice on this one
If it is working in development environment in your machine, then i think you should push your Gemfile.lock along with your code and deploy the application. Then "bundle install" in your production environment also installs the same gems versions as in your development environment.
这篇关于两个版本的宝石在生产轨道部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!