0

I migrated my Rails 3.2.13 application to Rails 4.0, by creating a fresh new Rails 4 application and migrating the app/config/lib/db/routes/Gemfile/public into it. Everything seems to be working ok except for the following error:

Whenever I call image_tag ex. <%= image_tag('home_vertical_separator.gif', :alt => 'Separator Image') %>.

An error prompts:

undefined local variable or method 'asset_paths' for #<#<Class:0x007fd5cb989b28>:0x007fd5cbdd2fe0>

Inside config/initializers/images_pipeline_path.rb at the line asset_paths.compute_public_path(source, 'images').

I know that sprockets is now considered as a separate project that is why I added the following line to the Gemfile:

gem 'sprockets-rails', :require => 'sprockets/railtie'

Unfortunately it is still not working, any hints?

wael34218
  • 4,860
  • 8
  • 44
  • 62
  • 2
    What is this `images_pipeline_path.rb`, where did you get that? – Mike Szyndel Jul 15 '13 at 07:25
  • At first I thought it was from rails generator itself. Then I tried to create new application and it wasn't there. It must have been moved during the migration. It seems it was added during the migration from rails 3.0 and 3.1. Anyway it worked after removing the file! Thanks! – wael34218 Jul 15 '13 at 10:21
  • can you create an answer and then mark that as the answer? – BJ McDuck Apr 19 '14 at 19:01

1 Answers1

0

I have removed images_pipeline_path.rb file from my configuration and it worked.

wael34218
  • 4,860
  • 8
  • 44
  • 62