I am new to Ruby on Rails. Now I have a problem of importing products from CSV files while I am trying to run Spree e-commerce platform.
To import products from CSV, "datashift" and "datashift_spree" gems are being used.
By the way, I got an error as follows when I run "bundle exec thor datashift_spree:load:products -v -i ./sample_csv/SpreeMultiVariant.csv" on Ubuntu shell.
Loading from CSV file: ./sample_csv/SpreeMultiVariant.csv
Processing 3 rows
Failed to process row [1] (["PIKS-001", "Demo Product for AR Loader", "blah blah", "02/10/16", "399.99", "VAT", "small", "320", "mime_type:jpeg, PDF;print_type:colour", nil, "mime_type:PNG", "test_pp_001", "Paintings>Landscape", "WaterColour", nil, "12|6|7", "https://github.com/pikender/datashift_spree/raw/master/spec/fixtures/images/spree.png", nil])
<NoMethodError: undefined method `type_cast_from_database' for #>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I am new to Ruby on Rails. Now I have a problem of importing products from CSV files while I am trying to run Spree e-commerce platform.
To import products from CSV, "datashift" and "datashift_spree" gems are being used.
By the way, I got an error as follows when I run "bundle exec thor datashift_spree:load:products -v -i ./sample_csv/SpreeMultiVariant.csv" on Ubuntu shell.
Loading from CSV file: ./sample_csv/SpreeMultiVariant.csv Processing 3 rows Failed to process row [1] (["PIKS-001", "Demo Product for AR Loader", "blah blah", "02/10/16", "399.99", "VAT", "small", "320", "mime_type:jpeg, PDF;print_type:colour", nil, "mime_type:PNG", "test_pp_001", "Paintings>Landscape", "WaterColour", nil, "12|6|7", "https://github.com/pikender/datashift_spree/raw/master/spec/fixtures/images/spree.png", nil])
<NoMethodError: undefined method `type_cast_from_database' for #>
Failed to process row [2] (["PIKS-002", "Demo Excel Load via Jruby", "less blah", "03/10/16", "100", "Sales Tax", "medium", "30", "mime_type:jpeg;print_type:black_white", nil, "mime_type:PNG;print_type:black_white", "test_pp_003", "Paintings", "Oils", "Paintings>Nature>Landscape", "Delhi:5|Bombay:4", nil, "https://github.com/pikender/datashift_spree/raw/master/spec/fixtures/images/DEMO_001_ror_bag.jpeg|https://github.com/pikender/datashift_spree/raw/master/spec/fixtures/images/DEMO_004_ror_ringer.jpeg"])
<NoMethodError: undefined method `type_cast_from_database' for #>
Failed to process row [3] (["PIKS-003", "Demo third row in future", "more blah blah", "04/12/12", "50.34", "Entertainment Tax", "large", "23.34", "mime_type:jpeg;print_type:colour, sepia;size:large|mime_type:PNG", "mime_type:PDF|print_type:black_white", nil, "test_pp_002|test_pp_003:Example free value|yet_another_property", "Drawings>Landscape", "Landscape", "Paintings>Nature>Seascape>Cliffs", "12|4|7|12|2", "https://github.com/pikender/datashift_spree/raw/master/spec/fixtures/images/DEMO_003_ror_mug.jpeg", nil])
<NoMethodError: undefined method `type_cast_from_database' for #>
Processing Summary Report
I have no idea why that is occurred.
My Gemfile:
source 'https://rubygems.org'
gem 'rake', '~> 12.0'
Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0'
Use sqlite3 as the database for Active Record
gem 'pg', '~> 0.18'
Use Puma as the app server
gem 'puma', '~> 3.7'
Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
See https://github.com/rails/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby
Use jquery as the JavaScript library
gem 'jquery-rails', '~> 4.1'
Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'bootstrap-sass', '~> 3.3.6' gem 'font-awesome-rails'
Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
Use Unicorn as the app server
gem 'unicorn'
Use Capistrano for deployment
gem 'capistrano-rails', group: :development
group :development, :test do
Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug' end
group :development do
Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring' end
gem 'spree', '~> 3.2.0' gem 'spree_auth_devise', '~> 3.2.0' gem 'spree_gateway', '~> 3.2.0'
gem 'datashift', :git => 'https://github.com/vinsol-spree-contrib/datashift', branch: '0-16-stable' gem 'datashift_spree', :git => 'https://github.com/vinsol-spree-contrib/datashift_spree', branch: 'shopify/tmp'
gem 'spree_datashift_prod_import', :git => 'https://github.com/vinsol-spree-contrib/spree_datashift_prod_import'