Giter Club home page Giter Club logo

jquery-rails's Introduction

jquery-rails

jQuery! For Rails! So great.

This gem provides:

  • jQuery 1.7.2
  • jQuery UI 1.8.18 (javascript only)
  • the jQuery UJS adapter
  • assert_select_jquery to test jQuery responses in Ruby tests

Installation

Apps generated with Rails 3.1 or later include jquery-rails in the Gemfile by default. So just make a new app:

rails new myapp

If upgrading from an older version of rails, or for rails 3.0 apps, add the jquery-rails gem to your Gemfile.

gem "jquery-rails"

And run bundle install. The rest of the installation depends on whether the asset pipeline is being used.

Rails 3.1 or greater (with asset pipeline enabled)

The jquery and jquery-ujs files will be added to the asset pipeline and available for you to use. If they're not already in app/assets/javascripts/application.js by default, add these lines:

//= require jquery
//= require jquery_ujs

For jQuery UI, we recommend the jquery-ui-rails gem, as it includes the jquery-ui css and allows easier customization. This gem still packages the jQuery UI javascript for compatibility. To use it, add the following line to your application.js:

//= require jquery-ui

In order to use the themed parts of jQuery UI, you will also need to supply your own theme CSS (or use the jquery-ui-rails gem mentioned above).

Rails 3.0 (or greater with asset pipeline disabled)

This gem adds a single generator: jquery:install. Running the generator will remove any Prototype JS files you may happen to have, and copy jQuery and the jQuery-ujs driver for Rails (and optionally, jQuery UI) to the public/javascripts directory.

This gem will also hook into the Rails configuration process, removing Prototype and adding jQuery to the javascript files included by the javascript_include_tag(:defaults) call. While this gem contains the minified and un-minified versions of jQuery and jQuery UI, only the minified versions are included in :defaults.

To invoke the generator, run:

rails generate jquery:install #--ui to enable jQuery UI

You're done!

Contributing

Feel free to open an issue ticket if you find something that could be improved. A couple notes:

  • If it's an issue pertaining to the jquery-ujs javascript, please report it to the jquery-ujs project.

  • If the jquery or jquery-ui scripts are outdated (i.e. maybe a new version of jquery was released yesterday), feel free to open an issue and prod us to get that thing updated. However, for security reasons, we won't be accepting pull requests with updated jquery or jquery-ui scripts.

Acknowledgements

Many thanks are due to all of the jquery-rails contributors. Special thanks to JangoSteve for tirelessly answering questions and accepting patches, and the Rails Core Team for making jquery-rails an official part of Rails 3.1.

Copyright André Arko, released under the MIT License.

jquery-rails's People

Contributors

csommerauer avatar deleteme avatar digitalpardoe avatar ereslibre avatar francocatena avatar fzxu avatar htp avatar indirect avatar jangosteve avatar jeremy avatar joliss avatar josevalim avatar negonicrac avatar pic avatar purcell avatar pwnall avatar robertd avatar slbug avatar snowyote avatar stan avatar webmat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jquery-rails's Issues

Error when an app is created with the -J flag

If an app is created with
rails new testapp -J

(using the "-J" flag to eliminate the Prototype files)

then in the config/application.rb file

config.action_view.javascript_expansions[:defaults] = %w()

is not commented out and lib/jquery-rails.rb cannot override
config.action_view.javascript_expansions[:defaults]

to include the jquery files and you'll get an error "No expansion found for :defaults" when you run your app.

The README should say not to use the -J flag (since some people assume it is necessary when switching from Prototype to jQuery). Or the jquery-rails generator should modify the config/application.rb file to make sure the config.action_view.javascript_expansions[:defaults] setting is commented out.

Broken with Github secure redirect

It seems the generator is broken because Github is now redirecting all non-secure urls to secure ones. (See https://github.com/blog/738-sidejack-prevention-phase-2-ssl-everywhere)

What I get is this:

/home/user/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/open-uri.rb:216:in `open_loop': redirection forbidden: http://github.com/rails/jquery-ujs/raw/master/src/rails.js -> https://github.com/rails/jquery-ujs/raw/master/src/rails.js (RuntimeError)

I suppose the fix is just a matter of changing the Github URL in the source to https.

UI CSS Templates

It would be nice if you could also download a default UI CSS template

assert_select_jquery ?

should not the following satisfy the even more following:

$('#fubar').html('baz')


assert_select_jquery :html, '#fubar'

?

I can't even get assert_select_jquery to pass without args :(

SSL error on jquery:install --ui

Doing a fresh install on Rails 3.0.1 with jquery-rails 0.2.5. It installs jquery and jquery-ui and then goes for jQuery-UJS adapter and i get

fetching  jQuery UJS adapter (github HEAD)
/opt/local/lib/ruby/1.8/net/http.rb:586:in `connect': SSL_connect returned=1    errno=0 state=SSLv3 read server certificate B: certificate verify failed   (OpenSSL::SSL::SSLError)

followed by a crap load more http errors and such

Do not disable submit button when required input in not filled in

HTML 5 defines attribute "required" for input fields. Standard states that all "required" fields have to be filled in to submit the form.

Opera conforms this standard and do not submit form until all required fields are filled in (other browsers, including Chrome, Firefox and IE do submit the form).

But when you are using submit button with :disable_with option on Opera, button disables even when no request is sent (Opera does not send request on blank required fields).

Steps to reproduce:

  1. Create input field with attribute required="required"
  2. Create submit button with data-disable-with="Something" attribute
  3. Use jquery-rails

jQuery UI css files not included

when I install jquery using the generator, with the --ui option, it downloads and installs the jquery-ui.js files, but no css files. This means that to use a widget, for example a slider, I have to download the relevant css file and images, and add a stylesheet_link_tag in my layout file. I expected that this kind of thing would be done by the installer.
Maybe it's a design decision as I need to choose what theme to use? In that case, a note in the Readme would be useful.

NameError when running install generator

I get the following error when I attempt to run the install generator.

Chuckbook:wca_cert charliemezak$ rails g jquery:install --ui
/Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/jquery-rails-1.0.3/lib/generators/jquery/install/install_generator.rb:6:in <class:InstallGenerator>': uninitialized class variable @@jquery_version in Jquery::Generators::InstallGenerator (NameError) from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/jquery-rails-1.0.3/lib/generators/jquery/install/install_generator.rb:5:inmodule:Generators'
from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/jquery-rails-1.0.3/lib/generators/jquery/install/install_generator.rb:4:in <module:Jquery>' from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/jquery-rails-1.0.3/lib/generators/jquery/install/install_generator.rb:3:in<top (required)>'
from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in require' from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:inblock in require'
from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in block in load_dependency' from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:innew_constants_in'
from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in load_dependency' from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:inrequire'
from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/generators.rb:286:in block (2 levels) in lookup' from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/generators.rb:282:ineach'
from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/generators.rb:282:in block in lookup' from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/generators.rb:281:ineach'
from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/generators.rb:281:in lookup' from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/generators.rb:141:infind_by_namespace'
from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/generators.rb:161:in invoke' from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/commands/generate.rb:10:in<top (required)>'
from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in require' from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:inblock in require'
from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in block in load_dependency' from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:innew_constants_in'
from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in load_dependency' from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:inrequire'
from /Users/charliemezak/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/commands.rb:17:in <top (required)>' from script/rails:6:inrequire'
from script/rails:6:in `

'

setting config.action_view.javascript_expansions[:default] in config/application.rb isn't accepted

I'm using the following code in my config/application.rb:

 if Rails.env.production? 
 config.action_view.javascript_expansions[:defaults] = %w(jquery.min rails application)
  else
 config.action_view.javascript_expansions[:defaults] = %w(jquery rails application)
  end

But this isn't applied, it is always the one defined in the Railtie that gets applied. Is this expected behavior? Shouldn't it be possible to override the expansions in your own application?

TIA

Christiaan

License

What license is this released under? It needs to be in the project and documentation so that my company will let me use it.

jquery:install fails when behind a proxy

Automatic installation failed when being behind a proxy:
[code]
rails generate jquery:install
remove public/javascripts/controls.js
remove public/javascripts/dragdrop.js
remove public/javascripts/effects.js
remove public/javascripts/prototype.js
fetching jQuery (1.4.4)
warning could not find jQuery (1.4.4)
fetching jQuery (1.4.4)

C:/Ruby192/lib/ruby/1.9.1/open-uri.rb:346:in `open_http':
407 Proxy Authentication Required (OpenURI::HTTPError)
[/code]
OS: Windows XP x64 bits
Ruby: 1.9.2.
Rails: 3.0.3

Seg fault in 1.5 version?

rvm / snow leopard / 1.9.2 / 3.0.3

Ovid:proj dlipa$ rails generate jquery:install --ui
remove public/javascripts/controls.js
remove public/javascripts/dragdrop.js
remove public/javascripts/effects.js
remove public/javascripts/prototype.js
fetching jQuery (1.5)
create public/javascripts/jquery.js
create public/javascripts/jquery.min.js
fetching jQuery UI (latest 1.x release)
create public/javascripts/jquery-ui.js
create public/javascripts/jquery-ui.min.js
fetching jQuery UJS adapter (github HEAD)
/Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/http.rb:677: [BUG] Segmentation fault
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.6.0]

-- control frame ----------
c:0040 p:---- s:0195 b:0195 l:000194 d:000194 CFUNC :connect
c:0039 p:0440 s:0192 b:0192 l:000838 d:000838 METHOD /Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/http.rb:677
c:0038 p:0011 s:0185 b:0185 l:000184 d:000184 METHOD /Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/http.rb:637
c:0037 p:0048 s:0182 b:0182 l:000181 d:000181 METHOD /Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/http.rb:626
c:0036 p:0646 s:0179 b:0179 l:000178 d:000178 METHOD /Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:306
c:0035 p:0024 s:0159 b:0159 l:000158 d:000158 METHOD /Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:769
c:0034 p:0047 s:0153 b:0153 l:001950 d:000152 BLOCK /Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:203
c:0033 p:---- s:0151 b:0151 l:000150 d:000150 FINISH
c:0032 p:---- s:0149 b:0149 l:000148 d:000148 CFUNC :catch
c:0031 p:0491 s:0145 b:0145 l:001950 d:001950 METHOD /Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:201
c:0030 p:0328 s:0131 b:0131 l:000130 d:000130 METHOD /Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:146
c:0029 p:0022 s:0120 b:0120 l:000119 d:000119 METHOD /Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:671
c:0028 p:0096 s:0115 b:0115 l:000114 d:000114 METHOD /Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:33
c:0027 p:0103 s:0108 b:0108 l:000bd8 d:000bd8 METHOD /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/actions/file_manipulation.rb:77
c:0026 p:0031 s:0099 b:0099 l:000098 d:000098 METHOD /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/jquery-rails-0.2.7/lib/generators/jquery/install/install_generator.rb:34
c:0025 p:0036 s:0096 b:0096 l:000095 d:000095 METHOD /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/task.rb:22
c:0024 p:0071 s:0090 b:0090 l:000089 d:000089 METHOD /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/invocation.rb:118
c:0023 p:0012 s:0084 b:0084 l:000070 d:000083 BLOCK /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/invocation.rb:124
c:0022 p:---- s:0080 b:0080 l:000079 d:000079 FINISH
c:0021 p:---- s:0078 b:0078 l:000073 d:000077 IFUNC
c:0020 p:---- s:0076 b:0076 l:000075 d:000075 CFUNC :each
c:0019 p:---- s:0074 b:0074 l:000073 d:000073 CFUNC :map
c:0018 p:0023 s:0071 b:0071 l:000070 d:000070 METHOD /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/invocation.rb:124
c:0017 p:0152 s:0068 b:0068 l:000067 d:000067 METHOD /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/group.rb:226
c:0016 p:0102 s:0059 b:0059 l:000058 d:000058 METHOD /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/base.rb:389
c:0015 p:0114 s:0053 b:0053 l:000052 d:000052 METHOD /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/rails/generators.rb:163
c:0014 p:0154 s:0045 b:0045 l:000044 d:000044 TOP /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/rails/commands/generate.rb:10
c:0013 p:---- s:0042 b:0042 l:000041 d:000041 FINISH
c:0012 p:---- s:0040 b:0040 l:000039 d:000039 CFUNC :require
c:0011 p:0012 s:0036 b:0036 l:000020 d:000035 BLOCK /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239
c:0010 p:0005 s:0034 b:0034 l:000025 d:000033 BLOCK /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225
c:0009 p:0045 s:0032 b:0032 l:000031 d:000031 METHOD /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596
c:0008 p:0041 s:0026 b:0026 l:000025 d:000025 METHOD /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225
c:0007 p:0013 s:0021 b:0021 l:000020 d:000020 METHOD /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239
c:0006 p:0346 s:0016 b:0016 l:000015 d:000015 TOP /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/rails/commands.rb:17
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :require
c:0003 p:0061 s:0006 b:0006 l:0014d8 d:0009a8 EVAL script/rails:6
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH

c:0001 p:0000 s:0002 b:0002 l:0014d8 d:0014d8 TOP

-- Ruby level backtrace information ----------------------------------------
script/rails:6:in <main>' script/rails:6:inrequire'
/Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/rails/commands.rb:17:in <top (required)>' /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:inrequire'
/Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in load_dependency' /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:innew_constants_in'
/Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in block in load_dependency' /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:inblock in require'
/Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in require' /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/rails/commands/generate.rb:10:in<top (required)>'
/Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/rails/generators.rb:163:in invoke' /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/base.rb:389:instart'
/Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/group.rb:226:in dispatch' /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/invocation.rb:124:ininvoke_all'
/Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/invocation.rb:124:in map' /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/invocation.rb:124:ineach'
/Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/invocation.rb:124:in block in invoke_all' /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/invocation.rb:118:ininvoke_task'
/Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/task.rb:22:in run' /Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/jquery-rails-0.2.7/lib/generators/jquery/install/install_generator.rb:34:indownload_ujs_driver'
/Users/dlipa/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/actions/file_manipulation.rb:77:in get' /Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:33:inopen'
/Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:671:in open' /Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:146:inopen_uri'
/Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:201:in open_loop' /Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:201:incatch'
/Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:203:in block in open_loop' /Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:769:inbuffer_open'
/Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:306:in open_http' /Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/http.rb:626:instart'
/Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/http.rb:637:in do_start' /Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/http.rb:677:inconnect'
/Users/dlipa/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/http.rb:677:in `connect'

SSL error on jquery:install

This was closed as issue #17, but it's back again on Snow Leopard:

% rails generate jquery:install
fetching  jQuery UJS adapter (github HEAD)
/Users/jay/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:678:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)

Any desire to bundle rjs for Rails 3.1?

Hey,

I wrote jrails and was considering writing an adapter for Rails 3.1 to continue to be able to use rjs with jquery since rjs support is being pulled from the default install. Since rjs support for prototype is going into the prorotype-rails project, I thought it might make sense to add jquery and jquery-ui rjs and js helpers to the jquery-rails project instead of creating something new. Let me know if this is of any interest to you. Basically, I would just be taking most of the code from the existing prototype/scriptaculous helpers and converting them for use with jquery and jquery-ui.

github.com has bad SSL-certificate

With JRuby 1.6.0 I got this error when invokes rails g jquery:install:

rails g jquery:install
      remove  public/javascripts/controls.js
      remove  public/javascripts/dragdrop.js
      remove  public/javascripts/effects.js
      remove  public/javascripts/prototype.js
    fetching  jQuery (1.5)
      create  public/javascripts/jquery.js
      create  public/javascripts/jquery.min.js
    fetching  jQuery UJS adapter (github HEAD)
OpenSSL::SSL::SSLError: certificate verify failed
              connect at org/jruby/ext/openssl/SSLSocket.java:179
              connect at /home/antage/.rvm/rubies/jruby-1.6.0/lib/ruby/1.8/net/http.rb:586
             do_start at /home/antage/.rvm/rubies/jruby-1.6.0/lib/ruby/1.8/net/http.rb:553
                start at /home/antage/.rvm/rubies/jruby-1.6.0/lib/ruby/1.8/net/http.rb:542
            open_http at /home/antage/.rvm/rubies/jruby-1.6.0/lib/ruby/1.8/open-uri.rb:242
          buffer_open at /home/antage/.rvm/rubies/jruby-1.6.0/lib/ruby/1.8/open-uri.rb:616
            open_loop at /home/antage/.rvm/rubies/jruby-1.6.0/lib/ruby/1.8/open-uri.rb:164
                catch at org/jruby/RubyKernel.java:1190
            open_loop at /home/antage/.rvm/rubies/jruby-1.6.0/lib/ruby/1.8/open-uri.rb:162
             open_uri at /home/antage/.rvm/rubies/jruby-1.6.0/lib/ruby/1.8/open-uri.rb:132
                 open at /home/antage/.rvm/rubies/jruby-1.6.0/lib/ruby/1.8/open-uri.rb:518
                 open at /home/antage/.rvm/rubies/jruby-1.6.0/lib/ruby/1.8/open-uri.rb:30
                  get at /home/antage/.rvm/gems/jruby-1.6.0@los/gems/thor-0.14.6/lib/thor/actions/file_manipulation.rb:77
  download_ujs_driver at /home/antage/.rvm/gems/jruby-1.6.0@los/gems/jquery-rails-0.2.7/lib/generators/jquery/install/install_generator.rb:34

With wget I got same error:

LANG=C wget https://github.com/rails/jquery-ujs/raw/master/src/rails.js                
--2011-04-13 01:48:45--  https://github.com/rails/jquery-ujs/raw/master/src/rails.js
Resolving github.com... 207.97.227.239
Connecting to github.com|207.97.227.239|:443... connected.
ERROR: certificate common name `*.github.com' doesn't match requested host name `github.com'.
To connect to github.com insecurely, use `--no-check-certificate'.

Jquery-UI not loading

I've run jquery:install with the --ui option and the jqueryui files are in the right spot, but they aren't being included in the head tag. the application.js however is being included twice. Is there something else that I need to do other than have javascript_include_tag :defaults in my template?

jquery-rails does not contain tabs

What parts of jquery this plugin contains? I have assumed that all of them, but it does not include tabs and it is nowhere configurable.

Problems with Ruby EE

Hi,
there are problem with rails generate jquery:install on ruby enterprise edition:

    alec$ rails generate jquery:install
     remove  public/javascripts/controls.js
     remove  public/javascripts/dragdrop.js
     remove  public/javascripts/effects.js
     remove  public/javascripts/prototype.js
   fetching  jQuery (1.5)
     create  public/javascripts/jquery.js
     create  public/javascripts/jquery.min.js
   fetching  jQuery UJS adapter (github HEAD)
 /opt/rubyee/lib/ruby/1.8/net/http.rb:586: [BUG] Segmentation fault
 ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-darwin10.5.0], MBARI 0x6770, Ruby Enterprise Edition 2010.02

 Abort trap

 alec$ ruby -v
 ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-darwin10.5.0], MBARI 0x6770, Ruby Enterprise Edition 2010.02

http -> https redirection on github

open-uri.rb:216:in `open_loop': redirection forbidden: http://github.com/rails/jquery-ujs/raw/master/src/rails.js -> https://github.com/rails/jquery-ujs/raw/master/src/rails.js (RuntimeError)

rails generate jquery:install blows up with Rails 3 rc2

I get this error when running the generator using Rails 3 rc2. Works fine with Rails 3 rc.

DEPRECATION WARNING: RAILS_ROOT is deprecated. Please use Rails.root.to_s. (called from method_missing at /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0.rc2/lib/rails/deprecation.rb:26)
(eval):1:in `block in initialize': uninitialized constant Rails::DeprecatedConstant::Rails (NameError)
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0.rc2/lib/rails/deprecation.rb:29:in `call'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0.rc2/lib/rails/deprecation.rb:29:in `method_missing'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/haml-3.0.17/lib/haml/util.rb:276:in `rails_root'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/haml-3.0.17/lib/sass/plugin/rails.rb:5:in `<top (required)>'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/haml-3.0.17/lib/sass/plugin.rb:268:in `<top (required)>'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/haml-3.0.17/lib/haml/railtie.rb:14:in `block in <top (required)>'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0.rc2/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0.rc2/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0.rc2/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0.rc2/lib/active_support/lazy_load_hooks.rb:42:in `each'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0.rc2/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0.rc2/lib/rails/application/bootstrap.rb:72:in `block in <module:Bootstrap>'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0.rc2/lib/rails/initializable.rb:25:in `instance_exec'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0.rc2/lib/rails/initializable.rb:25:in `run'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0.rc2/lib/rails/initializable.rb:50:in `block in run_initializers'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0.rc2/lib/rails/initializable.rb:49:in `each'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0.rc2/lib/rails/initializable.rb:49:in `run_initializers'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0.rc2/lib/rails/application.rb:134:in `initialize!'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0.rc2/lib/rails/application.rb:77:in `method_missing'
from /Users/i0n/Sites/devasclub/config/environment.rb:5:in `<top (required)>'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0.rc2/lib/rails/application.rb:103:in `require_environment!'
from /Users/i0n/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0.rc2/lib/rails/commands.rb:16:in `<top (required)>'
from script/rails:9:in `require'
from script/rails:9:in `<main>'

Update README to eliminate reference to the javascript_include_tag

The README says the generator adds "jQuery to the javascript files included by the javascript_include_tag(:defaults) call." That's a bit confusing since Rails 3 now uses
config.action_view.javascript_expansions[:defaults] = %w()

in the config/application.rb file and lib/jquery-rails.rb sets
config.action_view.javascript_expansions[:defaults]

to include the jquery files.

Please, the README should be updated to describe what the generator does for Rails 3.

AJAX calls should "Accept:" also "text/html"

Please replace:
xhr.setRequestHeader("Accept", "text/javascript");
with:
xhr.setRequestHeader("Accept", ["text/javascript", "text/html"]);

It will allow controller action to respond with clean, unescaped html.

BTW, Please also consider adding something resembling the lost :update => 'div_id" functionality:
jQuery(function($) {
$("a[data-update], form[data-update]").live("ajax:success", function(event, data, status, xhr) {
$("#"+$(this).attr("data-update")).html(data);
});
});

Issue with OpenURI call on jquery:install generator

I get the following error:

Ben-Reyess-MacBook-Pro-2:cvmongo Ben$ rails generate jquery:install --ui
remove public/javascripts/controls.js
remove public/javascripts/dragdrop.js
remove public/javascripts/effects.js
remove public/javascripts/prototype.js
fetching jQuery (1.4.3)
identical public/javascripts/jquery.js
identical public/javascripts/jquery.min.js
fetching jQuery UI (latest 1.x release)
create public/javascripts/jquery-ui.js
create public/javascripts/jquery-ui.min.js
fetching jQuery UJS adapter (github HEAD)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open-uri.rb:174:in open_loop': redirection forbidden: http://github.com/rails/jquery-ujs/raw/master/src/rails.js -> https://github.com/rails/jquery-ujs/raw/master/src/rails.js (RuntimeError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open-uri.rb:132:inopen_uri'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open-uri.rb:518:in open' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/open-uri.rb:30:inopen'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.4/lib/thor/actions/file_manipulation.rb:55:in get' from /Library/Ruby/Gems/1.8/gems/jquery-rails-0.2.4/lib/generators/jquery/install/install_generator.rb:34:indownload_ujs_driver'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.4/lib/thor/task.rb:22:in send' from /Library/Ruby/Gems/1.8/gems/thor-0.14.4/lib/thor/task.rb:22:inrun'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.4/lib/thor/invocation.rb:118:in invoke_task' from /Library/Ruby/Gems/1.8/gems/thor-0.14.4/lib/thor/invocation.rb:124:ininvoke_all'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.4/lib/thor/shell.rb:14:in map' from /Library/Ruby/Gems/1.8/gems/thor-0.14.4/lib/thor/core_ext/ordered_hash.rb:75:ineach'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.4/lib/thor/invocation.rb:124:in map' from /Library/Ruby/Gems/1.8/gems/thor-0.14.4/lib/thor/invocation.rb:124:ininvoke_all'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.4/lib/thor/group.rb:226:in dispatch' from /Library/Ruby/Gems/1.8/gems/thor-0.14.4/lib/thor/base.rb:389:instart'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.0/lib/rails/generators.rb:163:in invoke' from /Library/Ruby/Gems/1.8/gems/railties-3.0.0/lib/rails/commands/generate.rb:10 from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:inrequire'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in require' from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:inload_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:591:in new_constants_in' from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:inload_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in require' from /Library/Ruby/Gems/1.8/gems/railties-3.0.0/lib/rails/commands.rb:17 from script/rails:6:inrequire'
from script/rails:6

RuntimeError during `rails generate jquery:install`

/Users/david/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:216:in open_loop': redirection forbidden: http://github.com/rails/jquery-ujs/raw/master/src/rails.js -> https://github.com/rails/jquery-ujs/raw/master/src/rails.js (RuntimeError) from /Users/david/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:146:inopen_uri'
from /Users/david/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:671:in open' from /Users/david/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:33:inopen'
from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/thor-0.14.0/lib/thor/actions/file_manipulation.rb:55:in get' from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/jquery-rails-0.2.4/lib/generators/jquery/install/install_generator.rb:34:indownload_ujs_driver'
from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/thor-0.14.0/lib/thor/task.rb:22:in run' from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/thor-0.14.0/lib/thor/invocation.rb:118:ininvoke_task'
from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/thor-0.14.0/lib/thor/invocation.rb:124:in block in invoke_all' from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/thor-0.14.0/lib/thor/invocation.rb:124:ineach'
from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/thor-0.14.0/lib/thor/invocation.rb:124:in map' from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/thor-0.14.0/lib/thor/invocation.rb:124:ininvoke_all'
from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/thor-0.14.0/lib/thor/group.rb:226:in dispatch' from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/thor-0.14.0/lib/thor/base.rb:389:instart'
from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/railties-3.0.0/lib/rails/generators.rb:163:in invoke' from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/railties-3.0.0/lib/rails/commands/generate.rb:10:in<top (required)>'
from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in require' from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:inblock in require'
from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in block in load_dependency' from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:591:innew_constants_in'
from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in load_dependency' from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:inrequire'
from /Users/david/.rvm/gems/ruby-1.9.2-p136@goodbrews/gems/railties-3.0.0/lib/rails/commands.rb:17:in <top (required)>' from script/rails:6:inrequire'
from script/rails:6:in `

'

Confirmation box never returns false

Not sure if it's just for me, but clicking 'cancel' in a confirmation box doesn't return false, and the action will still be performed (in this case a delete). I've tested this in both Chrome and Opera on Ubuntu - it's possible that it's a bug with the browsers.

fe

gsdfgsdfgsdfg

Checkbox doesnt submit data

I'm not sure if this is a jquery issue or a jquery-rails issue.

But checkboxes fail to change the value of the when the user checks/unchecks the box.

Full Rails dependency?

Is jquery-rails really dependent on the full Rails stack? When I use this gem it brings in Active Record, which I'm trying to avoid in my app. For reference, indirect/haml-rails is only dependent on Active Support, Action Pack, and Railties.

when I run :rails g jquery:install, I got the following errors:

remove public/javascripts/controls.js
remove public/javascripts/dragdrop.js
remove public/javascripts/effects.js
remove public/javascripts/prototype.js
fetching jQuery (1.4.3)
identical public/javascripts/jquery.js
identical public/javascripts/jquery.min.js
fetching jQuery UJS adapter (github HEAD)
/Users/alex/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/net/http.rb:586:in connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError) from /Users/alex/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/net/http.rb:586:inconnect'
from /Users/alex/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/net/http.rb:553:in do_start' from /Users/alex/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/net/http.rb:542:instart'
from /Users/alex/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/open-uri.rb:242:in open_http' from /Users/alex/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/open-uri.rb:616:inbuffer_open'
from /Users/alex/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/open-uri.rb:164:in open_loop' from /Users/alex/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/open-uri.rb:162:incatch'
from /Users/alex/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/open-uri.rb:162:in open_loop' from /Users/alex/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/open-uri.rb:132:inopen_uri'
from /Users/alex/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/open-uri.rb:518:in open' from /Users/alex/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/open-uri.rb:30:inopen'
from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/thor-0.14.4/lib/thor/actions/file_manipulation.rb:55:in get' from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/jquery-rails-0.2.5/lib/generators/jquery/install/install_generator.rb:34:indownload_ujs_driver'
from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/thor-0.14.4/lib/thor/task.rb:22:in send' from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/thor-0.14.4/lib/thor/task.rb:22:inrun'
from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/thor-0.14.4/lib/thor/invocation.rb:118:in invoke_task' from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/thor-0.14.4/lib/thor/invocation.rb:124:ininvoke_all'
from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/thor-0.14.4/lib/thor/shell.rb:14:in map' from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/thor-0.14.4/lib/thor/core_ext/ordered_hash.rb:75:ineach'
from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/thor-0.14.4/lib/thor/invocation.rb:124:in map' from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/thor-0.14.4/lib/thor/invocation.rb:124:ininvoke_all'
from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/thor-0.14.4/lib/thor/group.rb:226:in dispatch' from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/thor-0.14.4/lib/thor/base.rb:389:instart'
from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/railties-3.0.1/lib/rails/generators.rb:163:in invoke' from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/railties-3.0.1/lib/rails/commands/generate.rb:10 from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:inrequire'
from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in require' from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:225:inload_dependency'
from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:591:in new_constants_in' from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:225:inload_dependency'
from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in require' from /Users/alex/.rvm/gems/ruby-1.8.7-p302/gems/railties-3.0.1/lib/rails/commands.rb:17 from script/rails:6:inrequire'
from script/rails:6

installation error (Segment fault)

Error can be seen here:
http://pastebin.com/Kh5qyRLS

Gem list:
gem 'rails', '3.0.7'
gem 'mysql2', '< 0.3'
gem 'acts-as-taggable-on'
gem 'jquery-rails'

Environment:
ruby 1.9.2-p180
rails 3.0.7
gem 1.8.4

Saw an old issue here:
#39

I also have macport installed. Wondering if it has anything to do with this?

authenticity_token in rails 3.0.5 and data-remote links with put oder delete method

Hi there,

thanks for the great gem!

In rails.js, line 35 is missing the csrf_token as param. I stumbled upon this issue recently and am using the latest released gem. This only seems to occur if the dataType is set to 'script' ... 'text/xml' works fine.

var data = el.is('form') ? el.serializeArray() : csrf_param+"="+csrf_token;

Regards,
Fred

README error

In the line of how to insert jQuery javascript.

javascript_tag(:defaults)

Should be.

javascript_include_tag(:defaults)

Segmentation fault when pg gem loaded

Hi,

When the pg gem is loaded, rails g jquery:install segfaults:

macbook-pro-de-philippe-lang:fart plang$ rails g jquery:install
remove public/javascripts/controls.js
remove public/javascripts/dragdrop.js
remove public/javascripts/effects.js
remove public/javascripts/prototype.js
fetching jQuery (1.5)
identical public/javascripts/jquery.js
identical public/javascripts/jquery.min.js
fetching jQuery UJS adapter (github HEAD)

 /Users/plang/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:678: 
[BUG] Segmentation fault ruby 1.9.2p180 (2011-02-18 revision 30909)
[x86_64-darwin10.6.0]

As soon as you comment it in the Gemfile, everything runs fine.

Any idea what kind of conflict there can be between jquery-rails and pg gems?

Install Jquery on Rails 3.1

I know we dont need to, but i think we should be able to install jquery on Rails 3.1.
We might want to debug something, and having the js inside the gem will not help.

Right know i'm profiling my application but I cant find the code anywhere because it is inside the jquery-rails gem.

1.0.3 Generator Fails For Class Variables

rails 3.0.7
jquery-rails 1.0.3
ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2011.03

sgerstacker@sgerstacker-laptop:~/Development/mets-fixes$ rails generate jquery:install
/home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/jquery-rails-1.0.3/lib/generators/jquery/install/install_generator.rb:6: uninitialized class variable @@jquery_version in Jquery::Generators::InstallGenerator (NameError)
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:in `new_constants_in'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.7/lib/rails/generators.rb:286:in `lookup'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.7/lib/rails/generators.rb:282:in `each'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.7/lib/rails/generators.rb:282:in `lookup'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.7/lib/rails/generators.rb:281:in `each'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.7/lib/rails/generators.rb:281:in `lookup'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.7/lib/rails/generators.rb:141:in `find_by_namespace'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.7/lib/rails/generators.rb:161:in `invoke'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.7/lib/rails/commands/generate.rb:10
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:in `new_constants_in'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
    from /home/sgerstacker/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.7/lib/rails/commands.rb:17
    from script/rails:6:in `require'
    from script/rails:6

It looks like the class variables are being used in the description before they are defined.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.