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 7981933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:31:34+00:00 2026-06-04T10:31:34+00:00

Trying to run Sprockets 2 in a Rails 2.3 app… After installing the gem

  • 0

Trying to run Sprockets 2 in a Rails 2.3 app…

After installing the gem and implementing this in config.ru according to this guide from Pivotal

require 'config/environment' if !defined?(Rails) || !Rails.initialized?
require 'sprockets'

unless Rails.env.production?
map '/assets' do
  sprockets = Sprockets::Environment.new
  sprockets.append_path 'app/assets/images'
  sprockets.append_path 'app/assets/javascripts'
  sprockets.append_path 'app/assets/stylesheets'

  Sprockets::Helpers.configure do |config|
    config.environment = sprockets
    config.prefix      = "/assets"
    config.digest      = false
  end

  run sprockets
  end
end

map '/' do
  use Rails::Rack::LogTailer unless Rails.env.test?
  use Rails::Rack::Debugger unless Rails.env.test?
  use Rails::Rack::Static
  run ActionController::Dispatcher.new
end

Then I created app/assets and moved the javascripts, images, and stylesheets directories out of public and into app/assets. Inside of app/assets/javascripts/application.js I have:

//= require_tree .

Inside of app/assets/stylesheets/application.css I have:

/* ...
*= require_self
*= require_tree .
*/

And of course in layout I have:

<%= stylesheet_link_tag "assets/application" %>
<%= javascript_include_tag "assets/application" %>

Something in my configuration is missing, none of my assets will show up. Any tips?

  • 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-04T10:31:35+00:00Added an answer on June 4, 2026 at 10:31 am

    So I had the same issue. I did a writeup with my solution: http://jaredonline.github.com/blog/2012/05/16/sprockets-2-with-rails-2-dot-3/

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

Sidebar

Related Questions

I am trying run a program from a qmake .pro file which modifies the
Trying to run a self-hosted app on my Win 7 system, with little success.
Am trying to run pdf.js example on localhost and after downloading i did make
When trying to run a new refinerycms application with ruby 1.9.2 rails 3.2.1 and
Trying to run a simple svn list svn+ssh://... from within jenkins on os X,
i'm trying to use Mongoid with rails 3.2.2, i've added: gem mongoid, ~> 2.4
When trying run this code: At first it prints Process some_id BEFORE enter for
I am trying to run a UNIX command on remote host from my C#
this is my first Android app and I'm trying to use Sockets to send
I'm trying to run some queries to a database from a pylons (paster-based) webserver

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.