Is DS_Store needed for Rails? Cannot start Rails 3.2.12 or run Rails console because of dependency on DS_Store on OS X

StackOverflow https://stackoverflow.com/questions/23399570

Question

We cannot run Rails on OS X because of some dependency on .DS_Store. We cannot even run the Rails console. Is this needed? Should we remove .DS_Store? We don't have this problem, with the same code, on Windows.

We're on Rails 3.2.12.

Thanks!

Stack trace below:

willclark:t c$ rails console
REQUIRING DEPENDENCY: .
REQUIRING DEPENDENCY: ..
REQUIRING DEPENDENCY: .DS_Store
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:317:in `rescue in depend_on': No such file to load -- .DS_Store (LoadError)
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:312:in `depend_on'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:225:in `require_dependency'
    from /Users/c/Desktop/Sites/t/config/initializers/dev_classes_dependency.rb:4:in `block in <top (required)>'
    from /Users/c/Desktop/Sites/t/config/initializers/dev_classes_dependency.rb:2:in `foreach'
    from /Users/c/Desktop/Sites/t/config/initializers/dev_classes_dependency.rb:2:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `block in load'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/engine.rb:587:in `each'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/engine.rb:587:in `block in <class:Engine>'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /Users/c/Desktop/Sites/t/config/environment.rb:5:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/application.rb:103:in `require'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/application.rb:103:in `require_environment!'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/commands.rb:40:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'
Was it helpful?

Solution

You need to look into your config/initializers/dev_classes_dependency.rb and remove dependency in there. As mentioned by user2062950, this should be obsolete, but you should probably ask your project leader or anyone who will know why this dependency has been added.

If you have troubles with removing those dependencies, please update your question with the content of this file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top