Spiros K.
2009-Feb-13 09:19 UTC
Auto_complete plugin in Rails 2.2.2 (auto_complete_for method not found)
Hello world, I am considering myself to be a newbie in Ruby, but not programming in general and i have a very serious problem trying to get Rails 2.2.2 to install the auto_complete plugin in Windows XP. I always get the "auto_complete_for method not found" error in ruby. After 2 days of full-internet-search I have tried the following: * Using the "ruby script/plugin install auto_complete" command : results in "not found" (even after adding every single repository under discovery) * Trying to load the SVN URL posted in oh-so-many forums, in the "ruby on rails" official site, I get a "page not found" error * Trying to manually copy the files in the vendor/plugin directory of my project (got them from the model_auto_completer example), but still does not work... (if i execute "script/plugin list" there is nothing) Regarding this last part, i have been trying to find documentation about how to manually install a plugin, but with no results. In every forum that someone asks "how to do it manually" people respond with "script/plugin install". This is automatic, not manually, as i am sure most of you know. What i am searching for is instructions on: where to place the files myself and what to execute myself so that my project will ''use'' the plugin. I will be thankful for any help you might offer, no matter how small, but PLEASE don''t repeat to me steps i have already taken with no differentation what-so-ever. This is both pointless and insulting. Yours sincerely, a frustrated RoR programmer Spiros K. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2009-Feb-13 10:55 UTC
Re: Auto_complete plugin in Rails 2.2.2 (auto_complete_for method not found)
On 13 Feb 2009, at 09:19, Spiros K. wrote:> page not found" error > > * Trying to manually copy the files in the vendor/plugin directory of > my project (got them from the model_auto_completer example), but still > does not work... (if i execute "script/plugin list" there is nothing) > > Regarding this last part, i have been trying to find documentation > about how to manually install a plugin, but with no results. In every > forum that someone asks "how to do it manually" people respond with > "script/plugin install". This is automatic, not manually, as i am sure > most of you know. What i am searching for is instructions on: where to > place the files myself and what to execute myself so that my project > will ''use'' the plugin.Copying the files into vendor/plugins is all there is to it 99% of the time. Some plugins have an install.rb file that needs to be run after this. Don''t worry about the output of script/plugin list (which as far as I can tell is for listing available, not installed plugins) The autocomplete plugin is on github these days: http://github.com/rails/auto_complete/tree/master Newer versions of rails include a version of script/plugin that can install plugins from git repositories (assuming you have git itself of course). Fred> > > I will be thankful for any help you might offer, no matter how small, > but PLEASE don''t repeat to me steps i have already taken with no > differentation what-so-ever. This is both pointless and insulting. > > Yours sincerely, > a frustrated RoR programmer > Spiros K. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Spiros K.
2009-Feb-14 09:58 UTC
Re: Auto_complete plugin in Rails 2.2.2 (auto_complete_for method not found)
Thanks for your reply, but 1. this specific plugin did not have an install.rb with it. 2. 2.2.2 is as new as they get I just downloaded 3 weels ago...?! And i think it works just fine with git as I have downloaded from git as well (though it messed my tortoise svn structure pretty badly) Then fired up my script/server and still: "method not found" for autocomplete_for method!!! :-( On Feb 13, 12:55 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 13 Feb 2009, at 09:19, Spiros K. wrote: > > > page not found" error > > > * Trying to manually copy the files in the vendor/plugin directory of > > my project (got them from the model_auto_completer example), but still > > does not work... (if i execute "script/plugin list" there is nothing) > > > Regarding this last part, i have been trying to find documentation > > about how to manually install a plugin, but with no results. In every > > forum that someone asks "how to do it manually" people respond with > > "script/plugin install". This is automatic, not manually, as i am sure > > most of you know. What i am searching for is instructions on: where to > > place the files myself and what to execute myself so that my project > > will ''use'' the plugin. > > Copying the files into vendor/plugins is all there is to it 99% of the > time. Some plugins have an install.rb file that needs to be run after > this. > Don''t worry about the output of script/plugin list (which as far as I > can tell is for listing available, not installed plugins) > > The autocomplete plugin is on github these days:http://github.com/rails/auto_complete/tree/master > > Newer versions of rails include a version of script/plugin that can > install plugins from git repositories (assuming you have git itself of > course). > > Fred > > > > > > > I will be thankful for any help you might offer, no matter how small, > > but PLEASE don''t repeat to me steps i have already taken with no > > differentation what-so-ever. This is both pointless and insulting. > > > Yours sincerely, > > a frustrated RoR programmer > > Spiros K.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2009-Feb-14 10:41 UTC
Re: Auto_complete plugin in Rails 2.2.2 (auto_complete_for method not found)
On Feb 14, 9:58 am, "Spiros K." <spiros...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks for your reply, > but > > 1. this specific plugin did not have an install.rb with it. > 2. 2.2.2 is as new as they get I just downloaded 3 weels ago...?! And > i think it works just fine with git as I have downloaded from git as > well (though it messed my tortoise svn structure pretty badly) >so is the plugin in vendor/plugins ?> Then fired up my script/server and still: > > "method not found" for autocomplete_for method!!! :-(I also assume that that was a typo and you actually write auto_complete_for in your controller. Fred> > On Feb 13, 12:55 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > On 13 Feb 2009, at 09:19, Spiros K. wrote: > > > > page not found" error > > > > * Trying to manually copy the files in the vendor/plugin directory of > > > my project (got them from the model_auto_completer example), but still > > > does not work... (if i execute "script/plugin list" there is nothing) > > > > Regarding this last part, i have been trying to find documentation > > > about how to manually install a plugin, but with no results. In every > > > forum that someone asks "how to do it manually" people respond with > > > "script/plugin install". This is automatic, not manually, as i am sure > > > most of you know. What i am searching for is instructions on: where to > > > place the files myself and what to execute myself so that my project > > > will ''use'' the plugin. > > > Copying the files into vendor/plugins is all there is to it 99% of the > > time. Some plugins have an install.rb file that needs to be run after > > this. > > Don''t worry about the output of script/plugin list (which as far as I > > can tell is for listing available, not installed plugins) > > > The autocomplete plugin is on github these days:http://github.com/rails/auto_complete/tree/master > > > Newer versions of rails include a version of script/plugin that can > > install plugins from git repositories (assuming you have git itself of > > course). > > > Fred > > > > I will be thankful for any help you might offer, no matter how small, > > > but PLEASE don''t repeat to me steps i have already taken with no > > > differentation what-so-ever. This is both pointless and insulting. > > > > Yours sincerely, > > > a frustrated RoR programmer > > > Spiros K.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Spiros K.
2009-Feb-14 15:52 UTC
Re: Auto_complete plugin in Rails 2.2.2 (auto_complete_for method not found)
Yes, the plugin IS in vendor plugins and YES you can check my first post in the thread and see that my 2nd post was actually a typo in my behalf. The problem remains as stated. BTW, the code was copy-pasted from tutorials that supposedly work, so I doubt there is any weird typo in the actual code. On Feb 14, 12:41 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Feb 14, 9:58 am, "Spiros K." <spiros...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks for your reply, > > but > > > 1. this specific plugin did not have an install.rb with it. > > 2. 2.2.2 is as new as they get I just downloaded 3 weels ago...?! And > > i think it works just fine with git as I have downloaded from git as > > well (though it messed my tortoise svn structure pretty badly) > > so is the plugin in vendor/plugins ? > > > Then fired up my script/server and still: > > > "method not found" for autocomplete_for method!!! :-( > > I also assume that that was a typo and you actually write > auto_complete_for in your controller. > > Fred > > > > > > > On Feb 13, 12:55 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > > > > On 13 Feb 2009, at 09:19, Spiros K. wrote: > > > > > page not found" error > > > > > * Trying to manually copy the files in the vendor/plugin directory of > > > > my project (got them from the model_auto_completer example), but still > > > > does not work... (if i execute "script/plugin list" there is nothing) > > > > > Regarding this last part, i have been trying to find documentation > > > > about how to manually install a plugin, but with no results. In every > > > > forum that someone asks "how to do it manually" people respond with > > > > "script/plugin install". This is automatic, not manually, as i am sure > > > > most of you know. What i am searching for is instructions on: where to > > > > place the files myself and what to execute myself so that my project > > > > will ''use'' the plugin. > > > > Copying the files into vendor/plugins is all there is to it 99% of the > > > time. Some plugins have an install.rb file that needs to be run after > > > this. > > > Don''t worry about the output of script/plugin list (which as far as I > > > can tell is for listing available, not installed plugins) > > > > The autocomplete plugin is on github these days:http://github.com/rails/auto_complete/tree/master > > > > Newer versions of rails include a version of script/plugin that can > > > install plugins from git repositories (assuming you have git itself of > > > course). > > > > Fred > > > > > I will be thankful for any help you might offer, no matter how small, > > > > but PLEASE don''t repeat to me steps i have already taken with no > > > > differentation what-so-ever. This is both pointless and insulting. > > > > > Yours sincerely, > > > > a frustrated RoR programmer > > > > Spiros K.- Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2009-Feb-14 16:55 UTC
Re: Auto_complete plugin in Rails 2.2.2 (auto_complete_for method not found)
On Feb 14, 3:52 pm, "Spiros K." <spiros...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Yes, the plugin IS in vendor plugins and YES you can check my first > post in the thread and see that my 2nd post was actually a typo in my > behalf. The problem remains as stated. >odd. i''d stick a breakpoint in the plugin''s init.rb to see what was happening there (you should have vendor/plugins/auto_complete/init.rb and vendor/plugins/auto_complete/lib ) If you have changed config.plugins or config.plugin_paths in environment.rb that could cause this (but I rather suspect you''d remember if you''d done that).> BTW, the code was copy-pasted from tutorials that supposedly work, so > I doubt there is any weird typo in the actual code.I wouldn''t be so sure :-) Fred> > On Feb 14, 12:41 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > On Feb 14, 9:58 am, "Spiros K." <spiros...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks for your reply, > > > but > > > > 1. this specific plugin did not have an install.rb with it. > > > 2. 2.2.2 is as new as they get I just downloaded 3 weels ago...?! And > > > i think it works just fine with git as I have downloaded from git as > > > well (though it messed my tortoise svn structure pretty badly) > > > so is the plugin in vendor/plugins ? > > > > Then fired up my script/server and still: > > > > "method not found" for autocomplete_for method!!! :-( > > > I also assume that that was a typo and you actually write > > auto_complete_for in your controller. > > > Fred > > > > On Feb 13, 12:55 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > > wrote: > > > > > On 13 Feb 2009, at 09:19, Spiros K. wrote: > > > > > > page not found" error > > > > > > * Trying to manually copy the files in the vendor/plugin directory of > > > > > my project (got them from the model_auto_completer example), but still > > > > > does not work... (if i execute "script/plugin list" there is nothing) > > > > > > Regarding this last part, i have been trying to find documentation > > > > > about how to manually install a plugin, but with no results. In every > > > > > forum that someone asks "how to do it manually" people respond with > > > > > "script/plugin install". This is automatic, not manually, as i am sure > > > > > most of you know. What i am searching for is instructions on: where to > > > > > place the files myself and what to execute myself so that my project > > > > > will ''use'' the plugin. > > > > > Copying the files into vendor/plugins is all there is to it 99% of the > > > > time. Some plugins have an install.rb file that needs to be run after > > > > this. > > > > Don''t worry about the output of script/plugin list (which as far as I > > > > can tell is for listing available, not installed plugins) > > > > > The autocomplete plugin is on github these days:http://github.com/rails/auto_complete/tree/master > > > > > Newer versions of rails include a version of script/plugin that can > > > > install plugins from git repositories (assuming you have git itself of > > > > course). > > > > > Fred > > > > > > I will be thankful for any help you might offer, no matter how small, > > > > > but PLEASE don''t repeat to me steps i have already taken with no > > > > > differentation what-so-ever. This is both pointless and insulting. > > > > > > Yours sincerely, > > > > > a frustrated RoR programmer > > > > > Spiros K.- Hide quoted text - > > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Spiros K.
2009-Feb-17 09:13 UTC
Re: Auto_complete plugin in Rails 2.2.2 (auto_complete_for method not found)
I checked today and everything is in order (that is commented out as
is the default).
Do you mean i should have added 1 or more lines to the
"environment.rb" file??
Anyway, so for the sake of completeness, here is my code!
#models#
#----------#
#book model
has_many :book_authorities, :dependent => :delete_all
has_many :authorities, :through => :book_authorities
#authority_model
has_many :book_authorities, :dependent => :delete_all
has_many :books, :through => :book_authorities
#book_authority model
belongs_to :book
belongs_to :authority
auto_complete_for :authority, :surname
#view#
#------#
<div class="book_authority">
<% fields_for "book[book_authority_attributes][]",
book_authority, :index => nil do |bookauthority_form| %>
authority: <%= bookauthority_form.select(:authority_id, $allnames)
%> <br />
capacity: <%= bookauthority_form.text_field :capacity, :index =>
nil %> <br />
<% if book_authority.new_record? %>
<%= link_to_function "remove", "$(this).up
(''.book_authority'').remove()" %>
<% else %>
<%= link_to_function "remove",
"mark_for_destroy_ba(this)" %>
<%= bookauthority_form.hidden_field :id %>
<%= bookauthority_form.hidden_field :should_destroy, :index =>
nil, :class => ''should_destroy'' %>
<% end %>
<% end %>
</div>
#controllers#
#---------------#
#application_controller
def update_authorities
#@allauthorities = Authority.find(:all, :limit => 5000, :order =>
"id ASC")
@allauthorities = Authority.find(:all)
$allnames = Hash.new()
for a in @allauthorities
$allnames.merge!({ ((a.surname || "") + " " + (a.name
|| "") +
"," + (a.short_title || "")) => a.id})
end
end
On Feb 14, 6:55 pm, Frederick Cheung
<frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> On Feb 14, 3:52 pm, "Spiros K."
<spiros...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Yes, the
plugin IS in vendor plugins and YES you can check my first
> > post in the thread and see that my 2nd post was actually a typo in my
> > behalf. The problem remains as stated.
>
> odd. i''d stick a breakpoint in the plugin''s init.rb to
see what was
> happening there (you should have vendor/plugins/auto_complete/init.rb
> and vendor/plugins/auto_complete/lib ) If you have changed
> config.plugins or config.plugin_paths in environment.rb that could
> cause this (but I rather suspect you''d remember if you''d
done that).
>
> > BTW, the code was copy-pasted from tutorials that supposedly work, so
> > I doubt there is any weird typo in the actual code.
>
> I wouldn''t be so sure :-)
>
> Fred
>
>
>
>
>
> > On Feb 14, 12:41 pm, Frederick Cheung
<frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > wrote:
>
> > > On Feb 14, 9:58 am, "Spiros K."
<spiros...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks for
your reply,
> > > > but
>
> > > > 1. this specific plugin did not have an install.rb with it.
> > > > 2. 2.2.2 is as new as they get I just downloaded 3 weels
ago...?! And
> > > > i think it works just fine with git as I have downloaded
from git as
> > > > well (though it messed my tortoise svn structure pretty
badly)
>
> > > so is the plugin in vendor/plugins ?
>
> > > > Then fired up my script/server and still:
>
> > > > "method not found" for autocomplete_for method!!!
:-(
>
> > > I also assume that that was a typo and you actually write
> > > auto_complete_for in your controller.
>
> > > Fred
>
> > > > On Feb 13, 12:55 pm, Frederick Cheung
<frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > > > wrote:
>
> > > > > On 13 Feb 2009, at 09:19, Spiros K. wrote:
>
> > > > > > page not found" error
>
> > > > > > * Trying to manually copy the files in the
vendor/plugin directory of
> > > > > > my project (got them from the model_auto_completer
example), but still
> > > > > > does not work... (if i execute "script/plugin
list" there is nothing)
>
> > > > > > Regarding this last part, i have been trying to
find documentation
> > > > > > about how to manually install a plugin, but with
no results. In every
> > > > > > forum that someone asks "how to do it
manually" people respond with
> > > > > > "script/plugin install". This is
automatic, not manually, as i am sure
> > > > > > most of you know. What i am searching for is
instructions on: where to
> > > > > > place the files myself and what to execute myself
so that my project
> > > > > > will ''use'' the plugin.
>
> > > > > Copying the files into vendor/plugins is all there is
to it 99% of the
> > > > > time. Some plugins have an install.rb file that needs
to be run after
> > > > > this.
> > > > > Don''t worry about the output of script/plugin
list (which as far as I
> > > > > can tell is for listing available, not installed
plugins)
>
> > > > > The autocomplete plugin is on github these
days:http://github.com/rails/auto_complete/tree/master
>
> > > > > Newer versions of rails include a version of
script/plugin that can
> > > > > install plugins from git repositories (assuming you
have git itself of
> > > > > course).
>
> > > > > Fred
>
> > > > > > I will be thankful for any help you might offer,
no matter how small,
> > > > > > but PLEASE don''t repeat to me steps i
have already taken with no
> > > > > > differentation what-so-ever. This is both
pointless and insulting.
>
> > > > > > Yours sincerely,
> > > > > > a frustrated RoR programmer
> > > > > > Spiros K.- Hide quoted text -
>
> > > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---