- Found a book, jQuery: Novice To Ninja, that might be useful, but not sure about committing $40 yet.
- jQuery Best Practices
Found a good intro to isotope
a) To include files, create a config/isotope.yml file.
b) add gems
c) ruby script/rails plugin install git@github.com:elado/isotope.git
Errors!! Couldn't load the johnson gem. Lot's of googling and found that johnson isn't compatible with ruby 1.9.2, but others had success with 1.8.7. Fortunately, I'm using RVM to manage Ruby versions, just for instances like this.
in my project's root directory (which looking back on, I hope I don't regret)
# update RVM
$ rvm get head
$ rvm reload
$ rvm install 1.8.7-p302
# wait a while for the new ruby to install
# create gemsets for each version of rails I've got
$ rvm --create 1.8.7-p302@learningjava
$ rvm gemset list # lists the current gemsets
# now install bundler
$ gem install bundler
# check which ruby version:
$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10.8.0]
# check which version of rails
$ rails -v
Got and error "Rails is not currently installed on this system."
# install rails for this gemset
$ gem install rails --version 3.0.11
# worked
# ok, now retry bundler to see if johnson works
$ bundle install
# success!
Ok, now where was I? Following the intro to isotope from the top of this post.
$ ruby script/rails plugin install git@github.com:elado/isotope.git
***
Found my css templates were getting referenced from the wrong place, so cleaned that up.
***
Defined a logo in the app/helpers/application_helper.rb to allow for a simple line to get the logo in the application.html.erb
***
When I try to view the app using rails server, I get a lot of errors:
Started GET "/javascripts/jquery.toscrollTo.js" for 127.0.0.1 at Mon Feb 13 19:40:48 -0800 2012
ActionController::RoutingError (No route matches "/javascripts/jquery.toscrollTo.js"):
After reading lots of stackoverflow and other sites, it looks like I need to remove the :defaults in the application.html.erb file:
<%= javascript_include_tag :defaults %>
and replace it with a callout to each js file in public/javascripts/
<%= javascript_include_tag "jquery.js", "bj_folio.js" , "jquery.min.js", "jquery.toscrollTo.js", "jquery.isotope.min.js", "jquery.localscroll.js", "application.js" %>
I've also seen some reference that the loading order matters.
I have a feeling dynamically loading partials will be a good subject soon, so here's a good example.
No luck getting the app to work. Calling it a night.
No comments:
Post a Comment