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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:15:01+00:00 2026-05-26T17:15:01+00:00

My page worked locally before when it was just a static html page with

  • 0

My page worked locally before when it was just a static html page with jQuery. However, I built it on top of rails because I wanted free web hosting on heroku.

All I did was move the jQuery into the application.js file and changed the application.html.erb file because that’s all that’s needed, right?

I have the following included in my gemfile:

gem 'sqlite3'
gem 'jquery-rails'
gem 'thor'

Here’s my Application.html.erb file:

      <head>
          <title>Me</title>
            <%= stylesheet_link_tag :all %>
  <%= javascript_include_tag  "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" %>
  <%= javascript_include_tag  "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" %>
  <%= javascript_include_tag "jquery-rails.js" %>
  <%= javascript_include_tag "jquery.fancybox-1.3.4.js" %>
  <%= javascript_include_tag "jquery.fancybox-1.3.4.pack.js" %>
  <%= javascript_include_tag "jquery.fancybox-1.3.4.css" %>
  <%= javascript_include_tag "jquery.easing-1.3.pack.js" %>
  <%= javascript_include_tag "jquery.mousewheel-3.0.4.pack.js" %>
  <%= render 'layouts/stylesheets' %>
  <%= csrf_meta_tag %>
        </head>

And this is my application.js file:

// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

            $("a#example1").fancybox();

            $("a#example2").fancybox({
                'overlayShow'   : false,
                'transitionIn'  : 'elastic',
                'transitionOut' : 'elastic'
            });

            $("a#example3").fancybox({
                'transitionIn'  : 'none',
                'transitionOut' : 'none'    
            });

            $("a#example4").fancybox({
                'opacity'       : true,
                'overlayShow'   : false,
                'transitionIn'  : 'elastic',
                'transitionOut' : 'none'
            });

            $("a#example5").fancybox();

            $("a#example6").fancybox({
                'titlePosition'     : 'outside',
                'overlayColor'      : '#000',
                'overlayOpacity'    : 0.9
            });

            $("a#example7").fancybox({
                'titlePosition' : 'inside'
            });

            $("a#example8").fancybox({
                'titlePosition' : 'over'
            });

            $("a[rel=example_group]").fancybox({
                'transitionIn'      : 'none',
                'transitionOut'     : 'none',
                'titlePosition'     : 'over',
                'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
                    return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
                }
            });

            /*
            *   Examples - various
            */

            $("#various1").fancybox({
                'titlePosition'     : 'inside',
                'transitionIn'      : 'none',
                'transitionOut'     : 'none'
            });

            $("#various2").fancybox();

            $("#various3").fancybox({
                'width'             : '75%',
                'height'            : '75%',
                'autoScale'         : false,
                'transitionIn'      : 'none',
                'transitionOut'     : 'none',
                'type'              : 'iframe'
            });

            $("#various4").fancybox({
                'padding'           : 0,
                'autoScale'         : false,
                'transitionIn'      : 'none',
                'transitionOut'     : 'none'
            });
        });
  • 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-26T17:15:01+00:00Added an answer on May 26, 2026 at 5:15 pm

    Remove

    <%= javascript_include_tag :defaults %>
    

    Because that adds prototype (in case you are still with ~ 2.x to 3.0.x).

    Also it seems you are trying to use fancybox but have not included the necessary JS file for fancybox.

    First copy the jquery.fancybox-x.x.x.pack.js to public/js/
    Then include this tag

    <%= javascript_include_tag "jquery.fancybox-x.x.x.pack.js" %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery Image slider in a content page that worked fine. Once
We've tested the Jquery UI (jquery-ui-1.8.10.custom.min.js) Autocomplete function in a simple HTML page which
I wrote a google map lookup page. Everthing worked fine until I referenced the
I have a paging worked with NHibernate: public IEnumerable<Answer> GetAnswers(int page, int pageSize) {
I'm just starting with jQuery, and having trouble doing something embarrassingly simple: using .load()
I have a web service that I have published locally. I wrote an HTML
This page worked like a charm for years... enter the correspondng user id and
I have an HTML page that uses the JSONP Plugin to gracefully handle errors
Oooops I did it again. My site worked perfectly locally My development machine is
Here's my conundrum: I have a page that uses Google Maps V3 and jQuery.

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.