I'd like to try autocompletion, and my understanding based on AWDWR:2,
and on various website tutorials, is that I should install the script.aculos.us
javascript library.
My question is how to do that. The instructions on their site tell me
to "Put prototype.js, scriptaculous.js, builder.js, effects.js,
dragdrop.js, slider.js and controls.js in a directory of your website,
e.g. /javascripts", but I'm not sure what that means. A "locate" on
my box shows a couple of places that have such-named directories,
e.g.
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_view/
helpers/javascripts
and
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/html/javascripts
but I'm not sure I want to be messing with such things manually.
Is there a gem that will install script.aculo.us in a way that avoids
conflicts and allows for clean updates?
Alternatively, might someone be so kind as to tell me where I should
put the file?
I'd like to try autocompletion, and my understanding based on AWDWR:2,
and on various website tutorials, is that I should install the script.aculos.us
javascript library.
My question is how to do that. The instructions on their site tell me
to "Put prototype.js, scriptaculous.js, builder.js, effects.js,
dragdrop.js, slider.js and controls.js in a directory of your website,
e.g. /javascripts", but I'm not sure what that means.
You are reading the documentation in the wrong order or something.
Generate a rails project with
rails my_project
Go into the folder my_project/public/javascripts/ , and everything is there, pre-installed for you, ready for a web server to pick up the public folder and serve them, nearly automatically.
A "locate" on
my box shows a couple of places that have such-named directories,
Learn also to use a command line for these things. Nothing in Rails, and very little of the features in the available editors, can do the windows-oriented file browsing management thing. You shouldn't either to do Rails right, because you will soon be using 'rake' to manage and test things.
Thanks, Phlip. Now I see that the files are to go into
(myapp)/public/javascripts
but I'm still a bit worried about simply copying scriptaculous files
there, because doing so will over-write files
prototype.js
effects.js
dragdrop.js
controls.js
that already exist there, pre-installed by my rails command.
I guess I could back up the rails-installed files and replace them,
hoping that my tests would uncover any possible errors. But such a
strategy has proved risky in the past (I've been a unix nerd for 20
years), hence my followup on this thread.
1. Copy
scriptaculous.js
to
(myapp)/public/javascripts/
without copying the other five files named in the README for the
scriptaculous tarball.
2. Copy
scriptaculous.js
and the other files.
I tried #1 and it seems to work. I'll report here later, if I find
that there are problems.
To clarify my original request for anyone who happens upon this thread
later on, my initial hope was to install a "gem" that would cause the
"rails" command to create a working setup from the start, i.e.
installing all of the requisite files, including scriptaculous.js,
into the
(myapp)/public/javascripts
directory from the start.
To clarify my original request for anyone who happens upon this thread
later on, my initial hope was to install a "gem" that would cause the
"rails" command to create a working setup from the start, i.e.
installing all of the requisite files, including scriptaculous.js,
into the
(myapp)/public/javascripts
directory from the start.
What's wrong with the ones that are already there?
Excellent! This solves my problem completely. Somehow, I missed
that. Thanks, to all who have helped me with this, and perhaps will
help others who stumble upon this thread.