RailsCasts Pro episodes are now free!

Learn more or hide this

Saroar Khandoker's Profile

GitHub User: saroar

Site: https://www.saroarkhandoker.com

Comments by Saroar Khandoker

Avatar

Validation failed: Image could not download file: 301 Moved Permanently (Invalid Location URI)

this is my code

url = URI.extract(URI.encode((product.at_xpath('picture').text.strip)))[0]

  Product.create!(
    price: product.at_xpath('price').text,
    category_id: product.at_xpath('categoryId').text.gsub(cat_id, category),
    remote_image_url: uri,
    brand_id: product.at_xpath('vendor').text,
    title: product.at_xpath('name').text,
    description: product.at_xpath('description').text
  )

this url i am get
"http://trendsbrands.ru/upload/thumbs/%D0%A3%D0%A2000005993/e916578dfbf37f1d03c2f047dcedb986/middle.jpg"

any help or idea what going on

Avatar

hi there i m try too did you solve or find any way import product from large xml file if yes please let me share with thanks you can check my this link where i can import product form small file not from large file
http://stackoverflow.com/questions/36556532/how-to-import-20-thousand-product-from-large-xml-file-in-a-rails-app

Avatar

hi there i m try too did you solve or find any way import product from large xml file if yes please let me share with thanks you can check my this link where i can import product form small file not from large file
http://stackoverflow.com/questions/36556532/how-to-import-20-thousand-product-from-large-xml-file-in-a-rails-app

Avatar

did u solve it i have same problem when i don't have any data it give me nil

Avatar

how i can upload product from XML file is there any advice or video thanks or some code thanks advance