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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:21:25+00:00 2026-05-30T05:21:25+00:00

I am using Rails 3.1 with assets pipeline. However I have a very weird

  • 0

I am using Rails 3.1 with assets pipeline. However I have a very weird problem.

My application.html.haml is:

!!! 5
%html{:xmlns => 'http://www.w3.org/1999/xhtml'}
    %head
        = stylesheet_link_tag 'bootstrap', 'application'
        = yield :css
        %title BizPlug
        %meta{:content => 'text/html; charset=utf-8', 'http-equiv' => 'Content-Type'}
        = csrf_meta_tags
        = javascript_include_tag 'application'
        = yield :js 

In my view, I try to use content_for to dynamically load js file which looks like:

- content_for :css do
    = javascript_include_tag 'jquery.fancybox'
- content_for :js do
    = javascript_include_tag 'jquery.fancybox'  

.edit-panel
    %p.text_actions
        = link_to "Publish", publish_policy_draft_path(@policy_draft), :disable_with => 'Processing...', :method => 'PUT', :class => "primary btn"
        = link_to "Delete", policy_draft_path, :method => 'Delete', :confirm => 'Are you sure', :class => 'btn danger'
        = link_to "Close", policy_drafts_path, :class => 'btn'

However when I check the source code from browser, it gives me

<link href="/assets/bootstrap.css?body=1" media="screen" rel="stylesheet" type="text/css" />
<link href="/assets/compositions.css?body=1" media="screen" rel="stylesheet" type="text/css" />
<link href="/assets/base.css?body=1" media="screen" rel="stylesheet" type="text/css" />
<link href="/assets/simple.css?body=1" media="screen" rel="stylesheet" type="text/css" />   
<script src="/assets/jquery.fancybox?body=1" type="text/javascript"></script>

    <title>BizPlug</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
    <script src="/assets/jquery.min.js?body=1" type="text/javascript"></script>

I am wondering why the jquery.fancybox.js would be above of the application.js?

  • 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-05-30T05:21:26+00:00Added an answer on May 30, 2026 at 5:21 am

    Well, if what you copied and pasted is correct, then you have a JavaScript include tag going into your content_for :css block. That’s why the fancybox stuff is being required before application.js.

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

Sidebar

Related Questions

I have a rails 3 app and I am using the assets pipeline. In
I have a rails 3.2.6 app and I am using the asset pipeline and
I'm using Rails 3 with assets pipeline enabled. And I know images such as
I am using the assets pipeline (in Rails 3.1.3) and am kind of struggling
Using the Rails assets pipeline and a plugin for require.js, I can use CoffeeScript,
I have a Rails (3.1.3 with asset pipeline) application that will be deployed as
I have a Rails 3.1 project with the asset pipeline working great. The problem
i'm using the asset pipeline with rails 3.1 and less. i have my images
I'm using the assets pipeline from Rails 3.1 and I want to include some
I am using chosen-rails for integration of chosen.js with rails asset pipeline I have

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.