I am trying to install Spree on an old Rails App (3.2.5) in order to set up a shop section for a webpage.
I tried different gem versions and managed to get 0.30.0 installed.
In my gem file I have:
gem 'spree', '0.30.0'
gem 'acts_as_list', '0.1.2'
gem 'paperclip', '2.3.1.1'
gem 'stringex', '1.0.3'
when I try to create the site
rails g spree:site
I get the following error:
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/bundler-1.16.1/lib/bundler/runtime.rb:85:in `require': There was an error while trying to load the gem 'spree'. (Bundler::GemRequireError)
Gem Load Error is: ActiveRecord::ConnectionNotEstablished
Backtrace for gem load error is:
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/activerecord-3.2.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:404:in `retrieve_connection'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/activerecord-3.2.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:168:in `retrieve_connection'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/activerecord-3.2.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:142:in `connection'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/activerecord-3.2.5/lib/active_record/model_schema.rb:228:in `columns'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/activerecord-3.2.5/lib/active_record/model_schema.rb:248:in `column_names'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/rd_searchlogic-3.0.1/lib/searchlogic/named_scopes/ordering.rb:61:in `ordering_condition_details'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/rd_searchlogic-3.0.1/lib/searchlogic/named_scopes/ordering.rb:52:in `method_missing'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/spree_core-0.30.0/lib/spree_core/find_by_param.rb:105
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/activesupport-3.2.5/lib/active_support/dependencies.rb:251:in `gem_original_require'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/activesupport-3.2.5/lib/active_support/dependencies.rb:251:in `require'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/activesupport-3.2.5/lib/active_support/dependencies.rb:251:in `require'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/activesupport-3.2.5/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/activesupport-3.2.5/lib/active_support/dependencies.rb:251:in `require'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/spree_core-0.30.0/lib/spree_core.rb:47
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/spree-0.30.0/lib/spree.rb:1:in `gem_original_require'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/spree-0.30.0/lib/spree.rb:1:in `require'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/spree-0.30.0/lib/spree.rb:1
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `gem_original_require'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `require'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `require'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `each'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `require'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `each'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `require'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/bundler-1.16.1/lib/bundler.rb:114:in `require'
/Users/Useraccount/Development/SPREE/tst_spree_02/config/application.rb:7
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/railties-3.2.5/lib/rails/commands.rb:24:in `gem_original_require'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/railties-3.2.5/lib/rails/commands.rb:24:in `require'
/Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/railties-3.2.5/lib/rails/commands.rb:24
script/rails:6:in `gem_original_require'
script/rails:6:in `require'
script/rails:6
Bundler Error Backtrace:
from /Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `each'
from /Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `require'
from /Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `each'
from /Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `require'
from /Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/bundler-1.16.1/lib/bundler.rb:114:in `require'
from /Users/Useraccount/Development/SPREE/tst_spree_02/config/application.rb:7
from /Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/railties-3.2.5/lib/rails/commands.rb:24:in `gem_original_require'
from /Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/railties-3.2.5/lib/rails/commands.rb:24:in `require'
from /Users/Useraccount/.rvm/gems/ruby-1.8.7-p374@spree-test-02/gems/railties-3.2.5/lib/rails/commands.rb:24
from script/rails:6:in `gem_original_require'
from script/rails:6:in `require'
from script/rails:6
Unfortunately a newer version does not get installed on the web app and the older gems require older versions of Rails.
Why does that happen and how can I manage to get it running?
Aucun commentaire:
Enregistrer un commentaire