Above mentioned configuration works on development, but production makes me mad with this (after rake db:migrate, but also after regular request).
Forced to use edge versions of refinery engines, because 1.0.9 seems to be impossible to get installed without problems and with 3.1.x
+>> rake db:migrate RAILS_ENV=production --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
can't modify immutable index
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/sprockets-2.0.3/lib/sprockets/index.rb:59:in `expire_index!'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/sprockets-2.0.3/lib/sprockets/processing.rb:91:in `register_preprocessor'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/i18n-js-2.1.2/lib/i18n-js/engine.rb:12
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `run'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/railties-3.1.3/lib/rails/initializable.rb:55:in `run_initializers'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `each'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/railties-3.1.3/lib/rails/application.rb:96:in `initialize!'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `send'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
/var/www/papricek/blogisek.patrikjira.com/releases/20111228135719/config/environment.rb:5
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/railties-3.1.3/lib/rails/application.rb:83:in `require_environment!'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/railties-3.1.3/lib/rails/application.rb:193:in `initialize_tasks'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/home/papricek/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `invoke_prerequisites'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
/home/papricek/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/gems/rake-0.9.2.2/bin/rake:33
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/bin/rake:19:in `load'
/home/papricek/.rvm/gems/ree-1.8.7-2011.03#refinery/bin/rake:19
Tasks: TOP => db:migrate => environment
Gemfile and Gemfile.lock:
source 'http://rubygems.org'
gem 'rails', '3.1.3'
# Bundle edge Rails instead:
#gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'json'
gem 'execjs'
gem 'therubyracer'
gem 'pg'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.1.5'
# gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug'
gem "refinerycms", :git => "git://github.com/resolve/refinerycms.git"
# group :development, :test do
# gem 'refinerycms-testing', '~> 2.0'
# end
group :development do
gem 'rails-dev-tweaks', '~> 0.5.2'
# see https://github.com/wavii/rails-dev-tweaks/issues/3
gem 'routing-filter', :git => 'git://github.com/nevir/routing-filter.git'
end
# USER DEFINED
# Add i18n support (optional, you can remove this if you really want to but it is advised to keep it).
gem 'refinerycms-i18n', '~> 2.0.0', :git => 'git://github.com/parndt/refinerycms-i18n.git'
# Specify additional Refinery CMS Engines here (all optional):
gem 'refinerycms-blog', :git => 'git://github.com/resolve/refinerycms-blog.git', :branch => 'rails-3-1'
# gem 'refinerycms-inquiries', :git => 'git://github.com/resolve/refinerycms-inquiries.git', :branch => 'rails-3-1'
# gem 'refinerycms-search', :git => 'git://github.com/resolve/refinerycms-search.git', :branch => 'rails-3-1'
# gem 'refinerycms-page-images', :git => 'git://github.com/resolve/refinerycms-page-images.git', :branch => 'rails-3-1'
# END USER DEFINED
GIT
remote: git://github.com/nevir/routing-filter.git
revision: 1049885b01f5cfb09cee8ec7aad66abedaeb6847
specs:
routing-filter (0.2.4)
actionpack
GIT
remote: git://github.com/parndt/refinerycms-i18n.git
revision: 859388f33017591a176788f48975ce7fcb67eee1
specs:
refinerycms-i18n (2.0.0)
i18n-js (~> 2.1.2)
refinerycms-core (~> 2.0.0)
routing-filter (>= 0.2.3)
GIT
remote: git://github.com/resolve/refinerycms-blog.git
revision: 26243ddade61e5bbad8f07e14b0475000da58b51
branch: rails-3-1
specs:
refinerycms-blog (2.0.0)
acts-as-taggable-on
filters_spam (~> 0.2)
rails_autolink
refinerycms-core (~> 2.0.0)
seo_meta (~> 1.2.0.rc1)
GIT
remote: git://github.com/resolve/refinerycms.git
revision: 713e8bc79d7c4c44dc43ce579040956e24f90011
specs:
refinerycms (2.0.0)
bundler (~> 1.0)
refinerycms-authentication (= 2.0.0)
refinerycms-core (= 2.0.0)
refinerycms-dashboard (= 2.0.0)
refinerycms-images (= 2.0.0)
refinerycms-pages (= 2.0.0)
refinerycms-resources (= 2.0.0)
refinerycms-settings (= 2.0.0)
refinerycms-authentication (2.0.0)
devise (~> 1.4.0)
friendly_id_globalize3 (~> 3.2.1)
refinerycms-core (= 2.0.0)
refinerycms-core (2.0.0)
acts_as_indexed (~> 0.7)
awesome_nested_set (~> 2.0)
coffee-rails (~> 3.1.1)
friendly_id_globalize3 (~> 3.2.1)
globalize3 (~> 0.2.0.beta3)
jquery-rails (~> 1.0.19)
rails (>= 3.1.3)
refinerycms-settings (= 2.0.0)
sass-rails (~> 3.1.5)
truncate_html (~> 0.5)
uglifier
will_paginate (~> 3.0.2)
refinerycms-dashboard (2.0.0)
refinerycms-core (= 2.0.0)
refinerycms-images (2.0.0)
dragonfly (~> 0.9.8)
rack-cache (>= 0.5.3)
refinerycms-core (= 2.0.0)
refinerycms-pages (2.0.0)
awesome_nested_set (~> 2.0)
friendly_id_globalize3 (~> 3.2.1)
refinerycms-core (= 2.0.0)
seo_meta (>= 1.2.0.rc2)
refinerycms-resources (2.0.0)
dragonfly (~> 0.9.8)
rack-cache (>= 0.5.3)
refinerycms-core (= 2.0.0)
refinerycms-settings (2.0.0)
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.3)
actionpack (= 3.1.3)
mail (~> 2.3.0)
actionpack (3.1.3)
activemodel (= 3.1.3)
activesupport (= 3.1.3)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.5)
rack-cache (~> 1.1)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.3)
activemodel (3.1.3)
activesupport (= 3.1.3)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.3)
activemodel (= 3.1.3)
activesupport (= 3.1.3)
arel (~> 2.2.1)
tzinfo (~> 0.3.29)
activeresource (3.1.3)
activemodel (= 3.1.3)
activesupport (= 3.1.3)
activesupport (3.1.3)
multi_json (~> 1.0)
acts-as-taggable-on (2.2.1)
rails (~> 3.1)
acts_as_indexed (0.7.7)
arel (2.2.1)
awesome_nested_set (2.0.2)
activerecord (>= 3.0.0)
babosa (0.3.5)
bcrypt-ruby (3.0.1)
builder (3.0.0)
coffee-rails (3.1.1)
coffee-script (>= 2.2.0)
railties (~> 3.1.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.2.0)
devise (1.4.9)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
warden (~> 1.0.3)
dragonfly (0.9.8)
rack
erubis (2.7.0)
execjs (1.2.13)
multi_json (~> 1.0)
filters_spam (0.3)
friendly_id_globalize3 (3.2.1.5)
babosa (~> 0.3.0)
globalize3 (0.2.0.beta4)
activemodel (>= 3.0.0)
activerecord (>= 3.0.0)
paper_trail (~> 2)
hike (1.2.1)
i18n (0.6.0)
i18n-js (2.1.2)
i18n
jquery-rails (1.0.19)
railties (~> 3.0)
thor (~> 0.14)
json (1.6.4)
libv8 (3.3.10.4)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.0.4)
orm_adapter (0.0.5)
paper_trail (2.5.0)
rails (~> 3)
pg (0.12.0)
rake-compiler (~> 0.7)
polyglot (0.3.3)
rack (1.3.6)
rack-cache (1.1)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.1.3)
actionmailer (= 3.1.3)
actionpack (= 3.1.3)
activerecord (= 3.1.3)
activeresource (= 3.1.3)
activesupport (= 3.1.3)
bundler (~> 1.0)
railties (= 3.1.3)
rails-dev-tweaks (0.5.2)
rails (~> 3.1.0)
rails_autolink (1.0.4)
rails (>= 3.1.0)
railties (3.1.3)
actionpack (= 3.1.3)
activesupport (= 3.1.3)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
rake-compiler (0.7.9)
rake
rdoc (3.12)
json (~> 1.4)
sass (3.1.12)
sass-rails (3.1.5)
actionpack (~> 3.1.0)
railties (~> 3.1.0)
sass (~> 3.1.10)
tilt (~> 1.3.2)
seo_meta (1.2.0.rc2)
rails (>= 3.0.0)
sprockets (2.0.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (!= 1.3.0, ~> 1.1)
sqlite3 (1.3.5)
therubyracer (0.9.9)
libv8 (~> 3.3.10)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
truncate_html (0.5.1)
tzinfo (0.3.31)
uglifier (1.2.1)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
warden (1.0.6)
rack (>= 1.0)
will_paginate (3.0.2)
PLATFORMS
ruby
DEPENDENCIES
execjs
jquery-rails
json
pg
rails (= 3.1.3)
rails-dev-tweaks (~> 0.5.2)
refinerycms!
refinerycms-blog!
refinerycms-i18n (~> 2.0.0)!
routing-filter!
sass-rails (~> 3.1.5)
sqlite3
therubyracer
uglifier (>= 1.0.3)
Adding the following to the Gemfile fixed my issues:
gem 'i18n-js', :git => 'git://github.com/fnando/i18n-js.git'
Related
A friend of mine programmed me a website years ago. Unfortunately from one day to the next the website did not work anymore.
I do not have Ruby on my computer (I never had it before either).
I am currently trying to host the Website again on Heroku via Github (https://github.com/dtricc/zoquant) and I get the following error:
See here
My Gemfile looks as follows:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '3.2.0'
gem 'rails', '~> 7.0.3'
gem 'pg', '>= 0.18', '< 2.0'
gem 'puma', '~> 6.0.2'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'webpacker'
gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'bootsnap', '>= 1.1.0', require: false
gem 'autoprefixer-rails'
gem 'font-awesome-sass', '~> 5.6.1'
gem 'simple_form'
group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
My Gemfile.lock looks as follows:
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.2)
actionpack (= 5.2.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.3)
actionpack (= 7.0.3)
activejob (= 7.0.3)
activerecord (= 7.0.3)
activestorage (= 7.0.3)
activesupport (= 7.0.3)
mail (>= 2.7.1)
net-imap (>= 0)
net-pop (>= 0)
net-smtp (>= 0)
actiontext (7.0.3)
actionpack (= 7.0.3)
activerecord (= 7.0.3)
activestorage (= 7.0.3)
activesupport (= 7.0.3)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionmailer (5.2.2)
actionpack (= 5.2.2)
actionview (= 5.2.2)
activejob (= 5.2.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (7.0.3)
actionview (= 7.0.3)
activesupport (= 7.0.3)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionview (5.2.2)
activesupport (= 5.2.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.2)
activesupport (= 5.2.2)
globalid (>= 0.3.6)
activemodel (7.0.3)
activesupport (= 7.0.3)
activerecord (7.0.3)
activemodel (= 7.0.3)
activesupport (= 7.0.3)
activestorage (7.0.3)
actionpack (= 7.0.3)
activejob (= 7.0.3)
activerecord (= 7.0.3)
activesupport (= 7.0.3)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
arel (9.0.0)
autoprefixer-rails (9.4.10.2)
execjs
bindex (0.5.0)
bootsnap (1.4.1)
msgpack (~> 1.0)
builder (3.2.3)
byebug (11.0.0)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.5)
crass (1.0.4)
erubi (1.8.0)
execjs (2.7.0)
ffi (1.10.0)
font-awesome-sass (5.6.1)
sassc (>= 1.11)
globalid (0.4.2)
activesupport (>= 4.2.0)
i18n (1.6.0)
concurrent-ruby (~> 1.0)
jbuilder (2.8.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.2)
mimemagic (>= 0.3.2)
method_source (0.9.2)
mimemagic (0.4.2)
nokogiri (~> 1)
rake (>= 0)
mini_mime (1.0.1)
mini_portile2 (2.4.0)
minitest (5.11.3)
msgpack (1.2.9)
multi_json (1.13.1)
nio4r (2.3.1)
nokogiri (1.10.1)
mini_portile2 (~> 2.4.0)
pg (1.1.4)
puma (3.12.0)
rack (2.0.6)
rack-proxy (0.6.5)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (7.0.3)
actioncable (= 7.0.3)
actionmailbox (= 7.0.3)
actionmailer (= 7.0.3)
actionpack (= 7.0.3)
actiontext (= 7.0.3)
actionview (= 7.0.3)
activejob (= 7.0.3)
activemodel (= 7.0.3)
activerecord (= 7.0.3)
activestorage (= 7.0.3)
activesupport (= 7.0.3)
bundler (>= 1.15.0)
railties (= 7.0.3)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.2.2)
actionpack (= 5.2.2)
activesupport (= 5.2.2)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (12.3.2)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
ruby_dep (1.5.0)
sass (3.7.3)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.7)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sassc (2.2.1)
ffi (~> 1.9)
rake
simple_form (4.1.0)
actionpack (>= 5.0)
activemodel (>= 5.0)
spring (2.0.2)
activesupport (>= 4.2)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
thor (0.20.3)
thread_safe (0.3.6)
tilt (2.0.9)
turbolinks (5.2.0)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (4.1.20)
execjs (>= 0.3.0, < 3)
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
webpacker (4.0.2)
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
PLATFORMS
ruby
x86_64-linux
DEPENDENCIES
autoprefixer-rails
bootsnap (>= 1.1.0)
byebug
coffee-rails (~> 4.2)
font-awesome-sass (~> 5.6.1)
jbuilder (~> 2.5)
listen (>= 3.0.5, < 3.2)
pg (>= 0.18, < 2.0)
puma (~> 3.11)
rails (~> 5.2.2)
sass-rails (~> 5.0)
simple_form
spring
spring-watcher-listen (~> 2.0.0)
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
web-console (>= 3.3.0)
webpacker
RUBY VERSION
ruby (~> 3.2.0)
I would appreciate any help!
Best Lorenzo
I already changed the versions of some of the packages (I obtained the error that the packages are to old and not supported by Heroku.
Looking into your commit history in your GitHub account, it feels like you tried to update the Ruby from 2.5.3 to 3.2.0 and the Ruby on Rails version from 5.2.2 to 7.0.3 in your project without doing any code changes.
Ruby 3.0 introduced some syntax changes. And upgrading two major versions of Ruby on Rails without having to change anything in the application, is usually not possible.
I advise reverting those changes and to restart the upgrade. But this time, only update in small incremental steps, following the suggestions from the official Rails Guides about upgrading.
Additionally, each Rails version supports or has preferred Ruby versions to run with. I suggest following the update path for Ruby and Ruby on Rails from this answer.
I have a Rails import job that run as a cron job setup through the whenever gem. It was running correctly until I recently updated the app. Now we are seeing the following Error in the logs when the cron job tries to run. If I run the task manually it runs the import correctly.
/usr/local/lib/ruby/2.6.0/bundler/spec_set.rb:91:in `block in materialize': Could not find rake-13.0.1 in any of the sources (Bundler::GemNotFound)
from /usr/local/lib/ruby/2.6.0/bundler/spec_set.rb:85:in `map!'
from /usr/local/lib/ruby/2.6.0/bundler/spec_set.rb:85:in `materialize'
from /usr/local/lib/ruby/2.6.0/bundler/definition.rb:170:in `specs'
from /usr/local/lib/ruby/2.6.0/bundler/definition.rb:237:in `specs_for'
from /usr/local/lib/ruby/2.6.0/bundler/definition.rb:226:in `requested_specs'
from /usr/local/lib/ruby/2.6.0/bundler/runtime.rb:108:in `block in definition_method'
from /usr/local/lib/ruby/2.6.0/bundler/runtime.rb:20:in `setup'
from /usr/local/lib/ruby/2.6.0/bundler.rb:107:in `setup'
from /usr/local/lib/ruby/2.6.0/bundler/setup.rb:20:in `<top (required)>'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/commands.rb:33:in `<module:Spring>'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/commands.rb:4:in `<top (required)>'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/server.rb:9:in `<top (required)>'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/client/server.rb:9:in `call'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
from /usr/local/bundle/gems/spring-2.1.0/bin/spring:49:in `<main>'
/usr/local/lib/ruby/2.6.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'bundler' () required by `$BUNDLER_VERSION`. (Gem::MissingSpecVersionError)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:`
Checked in 'GEM_PATH=/home/sotldirectory', execute `gem env` for more information
from /usr/local/lib/ruby/2.6.0/rubygems/dependency.rb:323:in `to_spec'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:42:in `require'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/commands.rb:33:in `<module:Spring>'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/commands.rb:4:in `<top (required)>'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/server.rb:9:in `<top (required)>'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/client/server.rb:9:in `call'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
from /usr/local/bundle/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
from /usr/local/bundle/gems/spring-2.1.0/bin/spring:49:in `<main>'
I am seeing two rake versions inside the docker container
*** LOCAL GEMS ***
rake (13.0.1, 12.3.2)
The output from running bundle env
## Environment
Bundler 1.17.2
Platforms ruby, x86_64-linux
Ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
Full Path /usr/local/bin/ruby
Config Dir /usr/local/etc
RubyGems 3.0.3
Gem Home /usr/local/bundle
Gem Path /root/.gem/ruby/2.6.0:/usr/local/lib/ruby/gems/2.6.0:/usr/local/bundle
User Path /root/.gem/ruby/2.6.0
Bin Dir /usr/local/bundle/bin
Tools
Git 2.20.1
RVM not installed
rbenv not installed
chruby not installed
Bundler Build Metadata
Built At 2018-12-19
Git SHA 3fc4de72b
Released Version false
Bundler settings
retry
Set for your local app (/usr/local/bundle/config): 3
jobs
Set for your local app (/usr/local/bundle/config): 4
app_config
Set via BUNDLE_APP_CONFIG: "/usr/local/bundle"
silence_root_warning
Set via BUNDLE_SILENCE_ROOT_WARNING: true
### Gemfile
ruby
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.6.5'
# Rails Specific
# =====================================================================================
# Rails, MySQL, Puma
gem 'rails', '~> 5.2.0'
gem 'mysql2', '>= 0.4.4', '< 0.6.0'
gem 'puma', '~> 4.3'
# Rails Dependencies
gem 'sassc-rails'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
# loads rails apps faster
gem 'bootsnap', '>= 1.1.0', require: false
# Application Specific
# =====================================================================================
# validators
gem 'validate_url'
# security
gem 'sanitize'
# interface items
gem 'carrierwave', '~> 1.2', '>= 1.2.3'
gem 'mini_magick'
gem 'multi-select-rails'
# cas client
gem 'rack-cas', '~> 0.16.0'
# managing cron jobs
gem 'whenever', require: false
# frontend
gem 'normalize-scss'
gem 'font-awesome-sass'
gem "non-stupid-digest-assets" # generates assets without fingerprint for 404 and 500 errors.
# searching / indexing for speeds / pagination for elegance
# gem 'kaminari'
gem 'elasticsearch-model'
gem 'elasticsearch-rails'
# Test Suite
# =====================================================================================
group :test do
gem 'rspec-rails'
gem 'shoulda'
gem 'shoulda-matchers'
gem 'database_cleaner'
gem 'simplecov', '~> 0.10', '< 0.18'
gem 'simplecov-console'
gem 'capybara', '>= 2.15', '< 4.0'
gem 'selenium-webdriver', '~> 3.14'
gem 'elasticsearch-extensions'
gem 'executables'
gem 'rspec_junit_formatter'
end
# Development / Test Items (Primarily debugging)
# =====================================================================================
group :development, :test do
gem 'faker'
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] # from rails new
gem 'pry'
gem 'pry-rails'
gem 'factory_bot_rails'
gem 'webmock'
end
group :development do
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
# performance helper
gem 'bullet' # helps to eliminate N+1 Queries
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
### Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.4.1)
actionpack (= 5.2.4.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.4.1)
actionpack (= 5.2.4.1)
actionview (= 5.2.4.1)
activejob (= 5.2.4.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.4.1)
actionview (= 5.2.4.1)
activesupport (= 5.2.4.1)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.4.1)
activesupport (= 5.2.4.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.4.1)
activesupport (= 5.2.4.1)
globalid (>= 0.3.6)
activemodel (5.2.4.1)
activesupport (= 5.2.4.1)
activerecord (5.2.4.1)
activemodel (= 5.2.4.1)
activesupport (= 5.2.4.1)
arel (>= 9.0)
activestorage (5.2.4.1)
actionpack (= 5.2.4.1)
activerecord (= 5.2.4.1)
marcel (~> 0.3.1)
activesupport (5.2.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ansi (1.5.0)
arel (9.0.0)
bindex (0.8.1)
bootsnap (1.4.6)
msgpack (~> 1.0)
builder (3.2.4)
bullet (6.1.0)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
byebug (11.1.1)
capybara (3.31.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
xpath (~> 3.2)
carrierwave (1.3.1)
activemodel (>= 4.0.0)
activesupport (>= 4.0.0)
mime-types (>= 1.16)
childprocess (3.0.0)
chronic (0.10.2)
coderay (1.1.2)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.6)
crack (0.4.3)
safe_yaml (~> 1.0.0)
crass (1.0.6)
database_cleaner (1.8.3)
diff-lcs (1.3)
docile (1.3.2)
elasticsearch (7.5.0)
elasticsearch-api (= 7.5.0)
elasticsearch-transport (= 7.5.0)
elasticsearch-api (7.5.0)
multi_json
elasticsearch-extensions (0.0.31)
ansi
elasticsearch
elasticsearch-model (7.0.0)
activesupport (> 3)
elasticsearch (> 1)
hashie
elasticsearch-rails (7.0.0)
elasticsearch-transport (7.5.0)
faraday (>= 0.14, < 1)
multi_json
erubi (1.9.0)
execjs (2.7.0)
executables (0.1.0)
factory_bot (5.1.1)
activesupport (>= 4.2.0)
factory_bot_rails (5.1.1)
factory_bot (~> 5.1.0)
railties (>= 4.2.0)
faker (2.10.2)
i18n (>= 1.6, < 2)
faraday (0.17.3)
multipart-post (>= 1.2, < 3)
ffi (1.12.2)
font-awesome-sass (5.12.0)
sassc (>= 1.11)
globalid (0.4.2)
activesupport (>= 4.2.0)
hashdiff (1.0.1)
hashie (4.1.0)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
jbuilder (2.10.0)
activesupport (>= 5.0.0)
json (2.3.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.4.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (0.9.2)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.1009)
mimemagic (0.3.4)
mini_magick (4.10.1)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.0)
msgpack (1.3.3)
multi-select-rails (0.9.12)
railties (>= 3.0)
multi_json (1.14.1)
multipart-post (2.1.1)
mysql2 (0.5.3)
nio4r (2.5.2)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
nokogumbo (2.0.2)
nokogiri (~> 1.8, >= 1.8.4)
non-stupid-digest-assets (1.0.9)
sprockets (>= 2.0)
normalize-scss (7.0.1)
sass (~> 3.3)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (4.0.3)
puma (4.3.3)
nio4r (~> 2.0)
rack (2.2.2)
rack-cas (0.16.1)
addressable (~> 2.3)
nokogiri (~> 1.5)
rack (>= 1.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.4.1)
actioncable (= 5.2.4.1)
actionmailer (= 5.2.4.1)
actionpack (= 5.2.4.1)
actionview (= 5.2.4.1)
activejob (= 5.2.4.1)
activemodel (= 5.2.4.1)
activerecord (= 5.2.4.1)
activestorage (= 5.2.4.1)
activesupport (= 5.2.4.1)
bundler (>= 1.3.0)
railties (= 5.2.4.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (5.2.4.1)
actionpack (= 5.2.4.1)
activesupport (= 5.2.4.1)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (13.0.1)
rb-fsevent (0.10.3)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (1.7.0)
rspec-core (3.9.1)
rspec-support (~> 3.9.1)
rspec-expectations (3.9.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-rails (3.9.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.2)
rspec_junit_formatter (0.4.1)
rspec-core (>= 2, < 4, != 2.12.0)
ruby_dep (1.5.0)
rubyzip (2.2.0)
safe_yaml (1.0.5)
sanitize (5.1.0)
crass (~> 1.0.2)
nokogiri (>= 1.8.0)
nokogumbo (~> 2.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.2.1)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
shoulda (2.11.3)
shoulda-matchers (4.3.0)
activesupport (>= 4.2.0)
simplecov (0.17.1)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-console (0.7.2)
ansi
simplecov
terminal-table
simplecov-html (0.10.2)
spring (2.1.0)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (4.0.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thor (1.0.1)
thread_safe (0.3.6)
tilt (2.0.10)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.6)
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.6.1)
uniform_notifier (1.13.0)
validate_url (1.0.8)
activemodel (>= 3.0.0)
public_suffix
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
webmock (3.8.2)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
whenever (1.0.0)
chronic (>= 0.6.3)
xpath (3.2.0)
nokogiri (~> 1.8)
PLATFORMS
ruby
DEPENDENCIES
bootsnap (>= 1.1.0)
bullet
byebug
capybara (>= 2.15, < 4.0)
carrierwave (~> 1.2, >= 1.2.3)
coffee-rails (~> 4.2)
database_cleaner
elasticsearch-extensions
elasticsearch-model
elasticsearch-rails
executables
factory_bot_rails
faker
font-awesome-sass
jbuilder (~> 2.5)
listen (>= 3.0.5, < 3.2)
mini_magick
multi-select-rails
mysql2 (>= 0.4.4, < 0.6.0)
non-stupid-digest-assets
normalize-scss
pry
pry-rails
puma (~> 4.3)
rack-cas (~> 0.16.0)
rails (~> 5.2.0)
rspec-rails
rspec_junit_formatter
sanitize
sassc-rails
selenium-webdriver (~> 3.14)
shoulda
shoulda-matchers
simplecov (~> 0.10, < 0.18)
simplecov-console
spring
spring-watcher-listen (~> 2.0.0)
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
validate_url
web-console (>= 3.3.0)
webmock
whenever
RUBY VERSION
ruby 2.6.5p114
BUNDLED WITH
1.17.2
Docker File
FROM ruby:2.6
# Install capybara-webkit deps
RUN apt-get update \
&& apt-get install -y xvfb git cron qt5-default libqt5webkit5-dev \
gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x \
imagemagick
# Use JEMALLOC instead
RUN apt-get install -y libjemalloc2 libjemalloc-dev
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so
# Node.js
RUN curl -sL https://deb.nodesource.com/setup_13.x | bash - \
&& apt-get install -y nodejs
# yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -\
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install -y yarn
# Install our dependencies and rails
RUN mkdir -p /home/sotldirectory
WORKDIR /home/sotldirectory
ADD . /home/sotldirectory
RUN bundle install --jobs=4 --retry=3
# Copy openssl config to correct folder
RUN cp -R openssl.cnf /etc/ssl
ADD ./startup.sh /usr/bin/
RUN chmod -v +x /usr/bin/startup.sh
ENTRYPOINT ["/usr/bin/startup.sh"]
startup.sh
#!/bin/bash
# set terminal
export TERM=vt100
# start cron and update whenever
service cron start
whenever --update-crontab
# remove PID and start the server
file="./tmp/pids/server.pid"
[ -f $file ] && rm $file
bin/rails s -p 3000 -b '0.0.0.0'
schedule.rb - relavant section
# change to the base directory of the application
# run the file with the rails runner task
every 1.minutes do
command 'cd /home/sotldirectory && bin/rails r import/cron_import.rb'
end
I solved a similar issue invoking ./bin/bundle exec before rails, ruby or rake, I think bundler is lost in different ruby versions gems
Change
command 'cd /home/sotldirectory && bin/rails r import/cron_import.rb'
to
command 'cd /home/sotldirectory && bundle exec rails r import/cron_import.rb'
Also, which rake version is listed in your Gemfile.lock?
Changed the dockerfile from FROM ruby:2.6 to FROM ruby:2.6.0. Using ruby:2.6 appears to be pulling 2.6.5. I deleted the gemfile.lock and and a bundle install to reset the gemfile.lock. Currently it is showing one version of bundler 1.17.2 and everything is working normally again. For anyone else that sees this I believe their is issues with bundler 2 and rubygems.
Similar issue seen here
https://github.com/rubygems/bundler/issues/6882
Restart your system and it should work
Likely not the best way to migrate a rails 3 app to a rails 4 one, but I just deleted all the files (except for hidden .git files) and re-built a static webapp with no database or unit tests (rails new testapp -O --skip-bundle -T). Everything works fine on my localhost. I deleted then ran bundle install to re-create my Gemfile.lock.
I've also tested adding config.serve_static_assets = true; in config/application.rb but continue to see warning that "Detected Rails is not set to serve static_assets."
Here are the contents of my Gemfile:
source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0
gem 'rails', '4.0.2'
group :development do
#gem 'sqlite3', '1.3.8'
end
group :production do
gem 'rails_12factor' # for heroku
end
gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
group :doc do
gem 'sdoc', '0.3.20', require: false
end
And here is the output I get when trying to push to Heroku:
me-mbp:testapp me$ git push heroku master
Fetching repository, done.
Counting objects: 275, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (197/197), done.
Writing objects: 100% (211/211), 56.08 KiB | 0 bytes/s, done.
Total 211 (delta 117), reused 3 (delta 0)
-----> Ruby/Rails app detected
-----> Detected Rails is not set to serve static_assets
Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
Unresolved dependencies detected; Installing...
Using --without development:test
/tmp/build_25e2c7af-af3f-4901-8e75-4d3e12337bf8/Gemfile:2:in `evaluate': undefined method `ruby' for #<Bundler::Dsl:0x000000025d3c78> (NoMethodError)
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/dsl.rb:7:in `instance_eval'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/dsl.rb:7:in `evaluate'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/definition.rb:17:in `build'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler.rb:128:in `definition'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/cli.rb:225:in `install'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/bin/bundle:13:in `<top (required)>'
from /usr/ruby1.9.2/bin/bundle:19:in `load'
from /usr/ruby1.9.2/bin/bundle:19:in `<main>'
FAILED: http://devcenter.heroku.com/articles/bundler
! Push failed: failed to install gems via Bundler
! If the problem persists, see http://help.heroku.com and provide Request ID 25e2c7af-af3f-4901-8e75-4d3e12337bf8.
My full Gemfile.lock file shows a higher versioned bundler and rails:
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.0.2)
actionpack (= 4.0.2)
mail (~> 2.5.4)
actionpack (4.0.2)
activesupport (= 4.0.2)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.2)
activesupport (= 4.0.2)
builder (~> 3.1.0)
activerecord (4.0.2)
activemodel (= 4.0.2)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.2)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.2)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.1)
atomic (1.1.14)
builder (3.1.4)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.3)
erubis (2.7.0)
execjs (2.0.2)
hike (1.2.3)
i18n (0.6.9)
jbuilder (1.0.2)
activesupport (>= 3.0.0)
jquery-rails (3.0.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.8.2)
polyglot (0.3.3)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.2)
actionmailer (= 4.0.2)
actionpack (= 4.0.2)
activerecord (= 4.0.2)
activesupport (= 4.0.2)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.2)
sprockets-rails (~> 2.0.0)
rails_12factor (0.0.2)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.2)
rails_stdout_logging (0.0.3)
railties (4.0.2)
actionpack (= 4.0.2)
activesupport (= 4.0.2)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.1.1)
rdoc (3.12.2)
json (~> 1.4)
sass (3.2.13)
sass-rails (4.0.1)
railties (>= 4.0.0, < 5.0)
sass (>= 3.1.10)
sprockets-rails (~> 2.0.0)
sdoc (0.3.20)
json (>= 1.1.3)
rdoc (~> 3.10)
sprockets (2.10.1)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
thor (0.18.1)
thread_safe (0.1.3)
atomic
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (1.1.1)
coffee-rails
tzinfo (0.3.38)
uglifier (2.1.1)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
PLATFORMS
ruby
DEPENDENCIES
coffee-rails (= 4.0.1)
jbuilder (= 1.0.2)
jquery-rails (= 3.0.4)
rails (= 4.0.2)
rails_12factor
sass-rails (= 4.0.1)
sdoc (= 0.3.20)
turbolinks (= 1.1.1)
uglifier (= 2.1.1)
That error happens when using an old version of Bundler that doesn't support the ruby method inside the Gemfile.
This is confirmed by the deploy output
-----> Gemfile detected, running Bundler version 1.0.7
Because the Cedar stack is updated, I assume you are using the Bamboo stack. You should upgrade to Cedar.
This may have been asked somewhere else but I either couldn't find it or the solution didn't help me.
I successfully installed Homebrew, RVM, Ruby on Rails and mongoDB.
I followed these instructions http://mongoid.org/en/mongoid/docs/installation.html when installing mongoid but when I ran
rails g mongoid:config it said it could not find the generator.
So I ran rails g and it wasn't in the list. I checked my gem.lock file and it wasn't in there either. I manually put it in there but still no results.
When I ran bundle install on the project it wasn't there either. I tried installing it in my main directory and in the project directory to no avail.
Any direction would be greatly appreciated as I am new to this.
EDIT: My gem.lock file:
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.11)
actionpack (= 3.2.11)
mail (~> 2.4.4)
actionpack (3.2.11)
activemodel (= 3.2.11)
activesupport (= 3.2.11)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.11)
activesupport (= 3.2.11)
builder (~> 3.0.0)
activerecord (3.2.11)
activemodel (= 3.2.11)
activesupport (= 3.2.11)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.11)
activemodel (= 3.2.11)
activesupport (= 3.2.11)
activesupport (3.2.11)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
builder (3.0.4)
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.4.0)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.2.0)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.7.6)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.19)
multi_json (1.5.0)
polyglot (0.3.3)
rack (1.4.4)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.11)
actionmailer (= 3.2.11)
actionpack (= 3.2.11)
activerecord (= 3.2.11)
activeresource (= 3.2.11)
activesupport (= 3.2.11)
bundler (~> 1.0)
railties (= 3.2.11)
railties (3.2.11)
actionpack (= 3.2.11)
activesupport (= 3.2.11)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.0.3)
rdoc (3.12)
json (~> 1.4)
sass (3.2.5)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.7)
thor (0.17.0)
tilt (1.3.3)
treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.35)
uglifier (1.3.0)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
PLATFORMS
ruby
DEPENDENCIES
coffee-rails (~> 3.2.1)
jquery-rails
rails (= 3.2.11)
sass-rails (~> 3.2.3)
sqlite3
uglifier (>= 1.0.3)
EDIT: Sorry here's my GEmfile:
source 'https://rubygems.org'
gem 'rails', '3.2.11'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
# 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'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
As per instructions, add
gem "mongoid", "~> 3.0.0"
to your Gemfile to use Mongoid 3, and then
bundle install
Make sure that bundle install succeeds, check Gemfile.lock for mongoid, then
rails g mongoid:config
I need to use Resque to enqueue my jobs on Heroku.
As it's my first time to use it, I follow the instruction on this site:Resque with Redis To Go.
When I run the command:
$ rake resque:work QUEUE=*
the terminal shows:
rake aborted!
Please install the yajl-ruby or json gem
(See full trace by running task with --trace)
I had installed both yajl-ruby and json gem after I got the error; however, it didn't work.
If I ignore the problem and enter "rails s" to start the server.
It shows:
/Library/Ruby/Gems/1.8/gems/resque-1.19.0/lib/resque/helpers.rb:6: Please install the yajl-ruby or json gem (RuntimeError)
from /Library/Ruby/Gems/1.8/gems/resque-1.19.0/lib/resque.rb:10:in `require'
from /Library/Ruby/Gems/1.8/gems/resque-1.19.0/lib/resque.rb:10
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler.rb:120:in `require'
from /Users/Brian/Documents/cookie-monster/config/application.rb:7
from /Library/Ruby/Gems/1.8/gems/railties-3.0.5/lib/rails/commands.rb:28:in `require'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.5/lib/rails/commands.rb:28
from /Library/Ruby/Gems/1.8/gems/railties-3.0.5/lib/rails/commands.rb:27:in `tap'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.5/lib/rails/commands.rb:27
from script/rails:6:in `require'
from script/rails:6
I guess it's a problem of my environment, but I don't know how to solve it.
Please help me, thanks!!
mikhailov ask me to paste my Gemfile and Gemfile.lock.
Here it is:
Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.0.5'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'redis'
gem 'SystemTimer'
Gemfile.lock:
GEM
remote: http://rubygems.org/
specs:
abstract (1.0.0)
actionmailer (3.0.5)
actionpack (= 3.0.5)
mail (~> 2.2.15)
actionpack (3.0.5)
activemodel (= 3.0.5)
activesupport (= 3.0.5)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.4)
rack (~> 1.2.1)
rack-mount (~> 0.6.13)
rack-test (~> 0.5.7)
tzinfo (~> 0.3.23)
activemodel (3.0.5)
activesupport (= 3.0.5)
builder (~> 2.1.2)
i18n (~> 0.4)
activerecord (3.0.5)
activemodel (= 3.0.5)
activesupport (= 3.0.5)
arel (~> 2.0.2)
tzinfo (~> 0.3.23)
activeresource (3.0.5)
activemodel (= 3.0.5)
activesupport (= 3.0.5)
activesupport (3.0.5)
arel (2.0.9)
builder (2.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
i18n (0.5.0)
mail (2.2.15)
activesupport (>= 2.3.6)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.2)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-test (0.5.7)
rack (>= 1.0)
rails (3.0.5)
actionmailer (= 3.0.5)
actionpack (= 3.0.5)
activerecord (= 3.0.5)
activeresource (= 3.0.5)
activesupport (= 3.0.5)
bundler (~> 1.0)
railties (= 3.0.5)
railties (3.0.5)
actionpack (= 3.0.5)
activesupport (= 3.0.5)
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.9.2)
redis (2.2.2)
sqlite3-ruby (1.2.4)
thor (0.14.6)
treetop (1.4.9)
polyglot (>= 0.3.1)
tzinfo (0.3.25)
PLATFORMS
ruby
DEPENDENCIES
rails (= 3.0.5)
redis
sqlite3-ruby
You still should use/try:
bundle exec rake resque:work QUEUE=*
Resque has dependence on 'json' gem, so just add it into Gemfile:
gem 'json'
then Bundler pick the appropriate version to resolve dependencies