I'm following this rails cast on ajax pagination with rails. http://railscasts.com/episodes/240-search-sort-pagin开发者_如何转开发ate-with-ajax
I'm getting the following error when i try to install jquery
rails g jquery:install
'connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
The tutorial suggests adding this to the applicaiton.rb file but it gives the following error.
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
rails g jquery:install
`<top (required)>': uninitialized constant Object::OpenSSL (NameError)
I'm running Ruby version
ruby 1.9.2p180 (2011-02-18 revision 30909) [i386-darwin9.8.0]
and Rails version
Rails 3.0.5
Any have experience with this error?
Not sure what the error you're getting is... but if you want to install jquery for rails you just need to get and download the newest version of jquery from jquery.com, and then go here: https://github.com/rails/jquery-ujs which is the rails.js file for jquery. Then delete any prototype.js and other js files except application.js that the app first came installed with.
As long as you have jquery.js and rails.js and are including them in your application layout file, all of the railsisms will work such as :remote => true
, :disable_with => "My Message"
, and :confirm => "Are you sure about that?"
, in addition to whatever that railscast talks about.
精彩评论