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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:28:18+00:00 2026-06-14T02:28:18+00:00

I did a rails new today, then created a simple search bar: <form> <input

  • 0

I did a rails new today, then created a simple search bar:

<form>
  <input id='search-bar' type='search' name='search'></input>
</form>
<a id='search-btn' href="#">searching!</a>

Alright, how about some click handlers! So assets/javascripts/searches.js.coffee:

$('#search-btn').click ->
  alert 'BOOM'
  query = $('#search-bar').html
  console.log query

And… nothing. So I go to the Chrome console:

>$('a')
null
>$('body')
null
>$
function () { [native code] }

a jQuery with no selectors, not too helpful. What is going on here? If I add <script type="text/javascript" src='http://code.jquery.com/jquery-1.8.2.js'></script> to the page or my layout.html.erb, we’re all good.

I’m having the same issue with underscore-min.js (note it is not .min.js) not loading despite being in assets/javascripts. Given my (unmodified) application.js, it should load the current folder:

//= require jquery
//= require jquery_ujs
//= require_tree .

UPDATE

If I go to the Chrome inspector’s Resources tab and check out application.js, I see this:

// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
;

That doesn’t look like it is properly including the js files inside its directory

  • 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-14T02:28:19+00:00Added an answer on June 14, 2026 at 2:28 am

    Sprockets aren’t working for some reason. Check that you are properly including all the assets-related gems and that you didn’t change config/environments/development.rb. Obviously make sure there isn’t application.js in public/javascripts/, it should be in app/assets/javascripts.

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

Sidebar

Related Questions

What did I do :)? In rails form has f.error_messages alwais empty. How can
I created a new rails 3.2.0.rc1 app and generated a welcome controller with an
I am eager to try out DataMapper for a new Rails project. I created
On a fresh project, rails generate behaves strangely. I did: rails new pm cd
I'm working in a new rails app and I created a little utility class
I am new to rails platform. I am developing a simple applicatoin in which
It's Rails 3.1.0 What I did: rails new site cd site rails s The
Hey guys I'm new to rails. I'm practice what I've learned today about rails
New to rails and making a simple blog in rails 3.1.3 where a User
What did I do: create a new ruby app rails new campaigns_manager move to

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.