Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8817671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:54:24+00:00 2026-06-14T04:54:24+00:00

I have an up to date rails application, using rails 3.2 with mongoid 2.

  • 0

I have an up to date rails application, using rails 3.2 with mongoid 2. I was unable to start testing by typing rake. The exception thrown is (sanitized):

rake test                                                                                                                         
/railsapp/app/models/image.rb:18:in `<class:Image>': undefined method `[]' for nil:NilClass (NoMethodError)
    from /railsapp/app/models/image.rb:1:in `<top (required)>'
    from /gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
    from /gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
    from /gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
    from /gems/activesupport-3.2.8/lib/active_support/dependencies.rb:359:in `require_or_load'
    from /gems/activesupport-3.2.8/lib/active_support/dependencies.rb:313:in `depend_on'
    from /gems/activesupport-3.2.8/lib/active_support/dependencies.rb:225:in `require_dependency'
    from /gems/railties-3.2.8/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
    from /gems/railties-3.2.8/lib/rails/engine.rb:438:in `each'
    from /gems/railties-3.2.8/lib/rails/engine.rb:438:in `block in eager_load!'
    from /gems/railties-3.2.8/lib/rails/engine.rb:436:in `each'
    from /gems/railties-3.2.8/lib/rails/engine.rb:436:in `eager_load!'
    from /gems/railties-3.2.8/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
    from /gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
    from /gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
    from /gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
    from /gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
    from /gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
    from /gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /railsapp/config/environment.rb:7:in `<top (required)>'
    from /railsapp/test/test_helper.rb:2:in `require'
    from /railsapp/test/test_helper.rb:2:in `<top (required)>'
    from /railsapp/test/unit/post_test.rb:1:in `require'
    from /railsapp/test/unit/post_test.rb:1:in `<top (required)>'
    from /gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in `require'
    from /gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in <main>'
    from /gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:9:in `each'
    from /gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:9:in `block in <main>'
    from /gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `select'
    from /gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `<main>'
Errors running test:units! #<RuntimeError: Command failed with status (1): [/Users/janlimpens/.rvm/rubies/ruby-1.9.3-p...]>

I created a gist with the files that are of interest in the context:
https://gist.github.com/3989760

There is no test concerning the image model at all, there are no fixtures and the only test I have got is included into the gist, but it is not to blame, the error is thrown upon including test_helper.rb.

What are my options?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:54:25+00:00Added an answer on June 14, 2026 at 4:54 am

    When the tests start Rails loads up, as it does so it evaluates all of your models.

    This includes the Image model, which apparently has a bug or typo on line 18.

    Which would be this line:

    :path => "#{APP_CONFIG['uploads_dir']}/:class/:id/:attachment/:style.:extension",
    

    The only array notation here is:

    APP_CONFIG['uploads_dir']
    

    So, where is APP_CONFIG defined? And why is it a nil? These are the questions we must answer.

    You might start by grepping your project for this string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a pdf version of our rails application using the Prawn plugin,
I have a Rails application and I'm using jQuery to query my search view
I have a simple Rails application I'm using to try and learn Rails. It
I have a rails application that I've added jquery datepicker to a date field.
I have a DailyQuote model in my rails application which has a date and
How is it possible to keep my rails application up to date using chef?
I have a Rails 3 application and it's using Devise for the authentication. I
I have a Rails 3 application and I am using the following code to
I have an Rails ActiveRecord group query: a = Product.select(date(date) as date, count(id) as
I am considering developing an application using Ruby on Rails that is a planner

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.