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

  • SEARCH
  • Home
  • 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 8739541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:57:29+00:00 2026-06-13T10:57:29+00:00

I assume this would be the same as enabling the asset pipeline in a

  • 0

I assume this would be the same as enabling the asset pipeline in a project that was created --skip-sprockets – I could be mistaken.

I’m trying to run rake assets:precompile to test, and right now, since I’ve already added require 'sprockets/railtie' to my config/application.rb – it finds the task at least – but it says:

no such table: app_configs

Update: I’ve discovered that this error is coming from a model in our application called AppConfig – so I’m looking into that part. I don’t know why it only happens when running this rake task…

Update: It seems that this particular rake task is assuming I’m in the production environment, even though I’m in my development environment. Other rake tasks don’t seem to have this problem… ? It shows that the task it’s actually running is: /home/.../bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUP=assets

So it makes sense that it’s not finding the table, because it’s looking in the wrong database (probably one that doesn’t even exist). But how is it determining (incorrectly) that it’s in a production environment?

  • 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-13T10:57:30+00:00Added an answer on June 13, 2026 at 10:57 am

    As it turns out:

    I did have the asset pipeline setup almost correctly: all you have to do is run rake rails:update to make sure your project files are all updated to be compatible with your current Rails gem (3.1.x). It will warn you when it’s going to overwrite files and you can view the changes and edit the file yourself (there’s no merge option unfortunately). These changes include several configuration directives specific to the asset pipeline (in the config directory).

    One special problem I encountered is addressed by this post: How to build task 'assets:precompile'
    – (I was not requiring rails/all, so I had to add the sprockets require)

    After doing all this is when I ran into the production environment problem. The assets:precompile task intentionally uses the production environment so that it produces production-ready assets; if you use the development environment it compiles assets according to the configuration in environments/development.rb which generally doesn’t include digest urls. So that’s intentional – the problem then is that when it initializes the production environment, it’s trying to access a database that doesn’t exist in the dev environment. The way to get around that (for testing purposes) is to add this to your config/application.rb file:

    config.assets.initialize_on_precompile = false

    This prevents it from initializing the app and voila, no more initialization errors during asset pre-compilation 🙂 However: There’s no reason to leave this set to false, unless you intend to precompie all your assets in a non-production environment for some reason (like Heroku does) rather than allowing Capistrano or some other deployment tool to compile them in production when deploying the app. initialize_on_precompile actually lets you use models and other application resources in your asset templates, which can be a useful feature.

    Another helpful post: Upgrading from Rails 3 to Rails 3.1

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

Sidebar

Related Questions

While I would assume that in VC++ this would be a no brainer, it's
i would like to learn how to make PHP/CSS syntax generator. i assume this
Assume I have this model : class Task(models.Model): title = models.CharField() Now I would
This should be a really, really simple one, I would assume. I'm throwing together
I assumed that this would provide me with the list of follower names instead
Problem goes as this: Assume that your algorithm divide the given string into three
I assume this would be an issue with any JavaScript framework. I use MooTools
This question would not have existed if AspectJ worked the same way as EJB
Why/how does this create a seemingly infinite loop? Incorrectly, I assumed this would cause
I assume because the CLR this wouldn't be an issue?

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.