"File to import not found or unreadable: store/variables" in sandbox (potential solution included) #1649

Closed
laspluviosillas opened this Issue Jun 7, 2012 · 20 comments

Comments

Projects
None yet
9 participants
@laspluviosillas
Contributor

laspluviosillas commented Jun 7, 2012

After this commit, when generating a new sandbox site and running the server, I get the following issue:

"File to import not found or unreadable: store/variables"

Changing the bundler require command on config/application.rb:5 from:

Bundler.require(*Rails.groups)

to:

Bundler.require(*Rails.groups(:assets => %w(development test)))

Fixes the issue, but to be honest I'm not entirely sure why this works, so I'm not going to issue a pull request as I don't know what other repercussions this line change could cause. Obviously, the issue is related to sprockets and the asset pipeline.

@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Jun 12, 2012

Member

I'm getting this also inside the dummy application (which is what the sandbox uses) when I run the tests, so that makes sense. Looking into it right now.

Member

radar commented Jun 12, 2012

I'm getting this also inside the dummy application (which is what the sandbox uses) when I run the tests, so that makes sense. Looking into it right now.

@brentertz

This comment has been minimized.

Show comment
Hide comment
@brentertz

brentertz Jun 13, 2012

I am having the same issue when deploying to Heroku. olivierbuffon's solution below works well though. I had forgotten about that setting - thanks!

I am having the same issue when deploying to Heroku. olivierbuffon's solution below works well though. I had forgotten about that setting - thanks!

@olivierbuffon

This comment has been minimized.

Show comment
Hide comment
@olivierbuffon

olivierbuffon Jun 13, 2012

Adding "config.assets.initialize_on_precompile = false" tu my application.rb solved the problem for me (I'm using spree on heroku)

Adding "config.assets.initialize_on_precompile = false" tu my application.rb solved the problem for me (I'm using spree on heroku)

@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Jun 21, 2012

Member

As far as I know this is fixed now. I'm no longer geting it in the dummy app.

Member

radar commented Jun 21, 2012

As far as I know this is fixed now. I'm no longer geting it in the dummy app.

@radar radar closed this Jun 21, 2012

@nikolas

This comment has been minimized.

Show comment
Hide comment
@nikolas

nikolas Aug 24, 2012

I'm running into this issue in Spree, deployed to my own production server. I have both Bundler.require(*Rails.groups(:assets => %w(development test))) and config.assets.initialize_on_precompile = false in my application.rb.

nikolas commented Aug 24, 2012

I'm running into this issue in Spree, deployed to my own production server. I have both Bundler.require(*Rails.groups(:assets => %w(development test))) and config.assets.initialize_on_precompile = false in my application.rb.

@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Aug 24, 2012

Member

@nikolas Can you provide exact steps to reproduce this issue please?

Member

radar commented Aug 24, 2012

@nikolas Can you provide exact steps to reproduce this issue please?

@radar radar reopened this Aug 24, 2012

@sbounmy

This comment has been minimized.

Show comment
Hide comment
@sbounmy

sbounmy Aug 25, 2012

Contributor

having the same issue on a fresh dummy app : https://github.com/sbounmy/spree_minicart & spree_core 1.1.3

Contributor

sbounmy commented Aug 25, 2012

having the same issue on a fresh dummy app : https://github.com/sbounmy/spree_minicart & spree_core 1.1.3

@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Sep 8, 2012

Member

Are you still able to reproduce this issue?

Member

radar commented Sep 8, 2012

Are you still able to reproduce this issue?

@laspluviosillas

This comment has been minimized.

Show comment
Hide comment
@laspluviosillas

laspluviosillas Sep 8, 2012

Contributor

I'm almost certain it has to do with the rails version you're running and use to generate your new rails application. I'll run a test myself and see what I can find.

Contributor

laspluviosillas commented Sep 8, 2012

I'm almost certain it has to do with the rails version you're running and use to generate your new rails application. I'll run a test myself and see what I can find.

@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Sep 9, 2012

Member

Ok then. If you can find a way to reproduce it in a specific version of Rails then that'd be good. I'd start with looking at what version of Rails was the latest when this issue was created. Could also be and older sass-rails version?

On 08/09/2012, at 20:59, James Strong notifications@github.com wrote:

I'm almost certain it has to do with the rails version you're running and use to generate your new rails application. I'll run a test myself and see what I can find.


Reply to this email directly or view it on GitHub.

Member

radar commented Sep 9, 2012

Ok then. If you can find a way to reproduce it in a specific version of Rails then that'd be good. I'd start with looking at what version of Rails was the latest when this issue was created. Could also be and older sass-rails version?

On 08/09/2012, at 20:59, James Strong notifications@github.com wrote:

I'm almost certain it has to do with the rails version you're running and use to generate your new rails application. I'll run a test myself and see what I can find.


Reply to this email directly or view it on GitHub.

@crystalneth

This comment has been minimized.

Show comment
Hide comment
@crystalneth

crystalneth Sep 15, 2012

Contributor

Same here on a new app deployed to heroku. Using this gem https://github.com/aliix/spree-heroku, which might be part of the problem. Rails 3.2.8 and Spree 1.2.0

Contributor

crystalneth commented Sep 15, 2012

Same here on a new app deployed to heroku. Using this gem https://github.com/aliix/spree-heroku, which might be part of the problem. Rails 3.2.8 and Spree 1.2.0

@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Sep 15, 2012

Member

Aliix: could you please try experimenting with the solutions talked about here and in linked threads? I would, but I am flying for about the next two days. Limited to basic email and Internet access.

On 15/09/2012, at 5:57, aliix notifications@github.com wrote:

Same here on a new app deployed to heroku. Using this gem https://github.com/aliix/spree-heroku, which might be part of the problem. Rails 3.2.8 and Spree 1.2.0


Reply to this email directly or view it on GitHub.

Member

radar commented Sep 15, 2012

Aliix: could you please try experimenting with the solutions talked about here and in linked threads? I would, but I am flying for about the next two days. Limited to basic email and Internet access.

On 15/09/2012, at 5:57, aliix notifications@github.com wrote:

Same here on a new app deployed to heroku. Using this gem https://github.com/aliix/spree-heroku, which might be part of the problem. Rails 3.2.8 and Spree 1.2.0


Reply to this email directly or view it on GitHub.

@nikolas

This comment has been minimized.

Show comment
Hide comment
@nikolas

nikolas Sep 15, 2012

Can you stop emailing me

nikolas commented Sep 15, 2012

Can you stop emailing me

@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Sep 15, 2012

Member

Just unsubscribe from the ticket bro. (at the bottom of the page)

On 15/09/2012, at 11:51, nikolas notifications@github.com wrote:

Can you stop emailing me


Reply to this email directly or view it on GitHub.

Member

radar commented Sep 15, 2012

Just unsubscribe from the ticket bro. (at the bottom of the page)

On 15/09/2012, at 11:51, nikolas notifications@github.com wrote:

Can you stop emailing me


Reply to this email directly or view it on GitHub.

@laspluviosillas

This comment has been minimized.

Show comment
Hide comment
@laspluviosillas

laspluviosillas Sep 15, 2012

Contributor

For the record, I did some tests with previous versions of Spree and
sass-rails and haven't been able to replicate the issue, unfortunately.

On Sat, Sep 15, 2012 at 4:59 AM, Ryan Bigg notifications@github.com wrote:

Just unsubscribe from the ticket bro. (at the bottom of the page)

On 15/09/2012, at 11:51, nikolas notifications@github.com wrote:

Can you stop emailing me


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com/spree/spree/issues/1649#issuecomment-8583384.

Contributor

laspluviosillas commented Sep 15, 2012

For the record, I did some tests with previous versions of Spree and
sass-rails and haven't been able to replicate the issue, unfortunately.

On Sat, Sep 15, 2012 at 4:59 AM, Ryan Bigg notifications@github.com wrote:

Just unsubscribe from the ticket bro. (at the bottom of the page)

On 15/09/2012, at 11:51, nikolas notifications@github.com wrote:

Can you stop emailing me


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com/spree/spree/issues/1649#issuecomment-8583384.

@JDutil

This comment has been minimized.

Show comment
Hide comment
@JDutil

JDutil Sep 19, 2012

Member

@laspluviosillas I ran into this issue as well. In your application.rb file you do want:

Bundler.require(*Rails.groups(:assets => %w(development test)))

Then in your gemspec you want to make sure your including sass-rails and coffee-rails otherwise importing 'store/variables' fails. So I have the following development dependencies added to the gemspec to fix the sandbox issue:

  s.add_development_dependency 'capybara', '~> 1.1.2'
  s.add_development_dependency 'coffee-rails'
  s.add_development_dependency 'factory_girl', '~> 3.6'
  s.add_development_dependency 'ffaker'
  s.add_development_dependency 'rspec-rails',  '~> 2.9'
  s.add_development_dependency 'sass-rails'
  s.add_development_dependency 'sqlite3'
Member

JDutil commented Sep 19, 2012

@laspluviosillas I ran into this issue as well. In your application.rb file you do want:

Bundler.require(*Rails.groups(:assets => %w(development test)))

Then in your gemspec you want to make sure your including sass-rails and coffee-rails otherwise importing 'store/variables' fails. So I have the following development dependencies added to the gemspec to fix the sandbox issue:

  s.add_development_dependency 'capybara', '~> 1.1.2'
  s.add_development_dependency 'coffee-rails'
  s.add_development_dependency 'factory_girl', '~> 3.6'
  s.add_development_dependency 'ffaker'
  s.add_development_dependency 'rspec-rails',  '~> 2.9'
  s.add_development_dependency 'sass-rails'
  s.add_development_dependency 'sqlite3'
@crystalneth

This comment has been minimized.

Show comment
Hide comment
@crystalneth

crystalneth Sep 19, 2012

Contributor

This was actually resolved for me after moving config.assets.initialize_on_precompile = false to the correct place in application.rb (vs production.rb)

Contributor

crystalneth commented Sep 19, 2012

This was actually resolved for me after moving config.assets.initialize_on_precompile = false to the correct place in application.rb (vs production.rb)

@sbounmy

This comment has been minimized.

Show comment
Hide comment
@sbounmy

sbounmy Oct 12, 2012

Contributor

Have anyone tried to run integration test within an extension ?
'File to import not found or unreadable: store/variables' keeps showing up...

rails server works well in spec/dummy...
https://github.com/sbounmy/spree_store_credits/tree/1-2-stable

Contributor

sbounmy commented Oct 12, 2012

Have anyone tried to run integration test within an extension ?
'File to import not found or unreadable: store/variables' keeps showing up...

rails server works well in spec/dummy...
https://github.com/sbounmy/spree_store_credits/tree/1-2-stable

@sbounmy

This comment has been minimized.

Show comment
Hide comment
@sbounmy

sbounmy Oct 12, 2012

Contributor

@JDutil thanks it fixes the issue, hope it get merged quickly !

Contributor

sbounmy commented Oct 12, 2012

@JDutil thanks it fixes the issue, hope it get merged quickly !

@darrencauthon

This comment has been minimized.

Show comment
Hide comment
@darrencauthon

darrencauthon Oct 12, 2012

Thanks guys, this thread was a big help for my own issue!

Thanks guys, this thread was a big help for my own issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment