Folks I am new so I apologize if I come off as a totaly tool. I am finding Rails to be an amazing framework to use and having fun with it. I have run into a frustrating snag however with PLUGINS. I have a plugin installed in: /myapp/vendor/plugins/ When I run: ruby script/server in /myapp/ my WEBrick starts normally and I can access IP:3000. I get the default rails index page. How do I "enable" the plugin? How do I tell the app to use it? I try to access the directories and I just get 404 not founds so obviously I am not doing it correctly. Insight and advice greatly appreciated. -- Posted via http://www.ruby-forum.com/.
Update: When I access anything on the server now (index.html) the default rails page I get this: #<NoMethodError: undefined method `clear!'' for Controllers:Module> ["/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:53:in `reset_application!''", "/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:75:in `reset_after_dispatch''", "/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:46:in `dispatch''", "/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick_server.rb:117:in `handle_dispatch''", "/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick_server.rb:83:in `service''", "/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service''", "/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run''", "/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread''", "/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread''", "/usr/lib/ruby/1.8/webrick/server.rb:95:in `start''", "/usr/lib/ruby/1.8/webrick/server.rb:92:in `start''", "/usr/lib/ruby/1.8/webrick/server.rb:23:in `start''", "/usr/lib/ruby/1.8/webrick/server.rb:82:in `start''", "/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick_server.rb:69:in `dispatch''", "./script/../config/../vendor/rails/railties/lib/commands/servers/webrick.rb:59", "/usr/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require''", "./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:147:in `require''", "./script/../config/../vendor/rails/railties/lib/commands/server.rb:39", "script/server:3"] I have no idea what this means... -- Posted via http://www.ruby-forum.com/.
Brad wrote:> Folks I am new so I apologize if I come off as a totaly tool. I am > finding Rails to be an amazing framework to use and having fun with it. > I have run into a frustrating snag however with PLUGINS. > > I have a plugin installed in: /myapp/vendor/plugins/ > When I run: ruby script/server in /myapp/ my WEBrick starts normally and > I can access IP:3000. I get the default rails index page. > > How do I "enable" the plugin? How do I tell the app to use it? I try to > access the directories and I just get 404 not founds so obviously I am > not doing it correctly. > > Insight and advice greatly appreciated.Anyone have any ideas? :( -- Posted via http://www.ruby-forum.com/.
Hey Brad - each plugin does it''s own thing, and so your question is a little too generic. but you can count on needing a model/controller/view to use the plugin. The plugin will be generally activated by the Model - such as class Machine < ActiveRecord::Base acts_as_state_machine :initial => :idle state :idle state :running, :enter => Proc.new { |o| o.stop_timer(''idle''); o.do_work() } etc. ... This is how I ''use'' the act_as_state_machine plugin. see the plugins docs for instructions on how it is specially used. enjoy the journey! Jodi On 24-Jul-06, at 11:58 AM, Brad wrote:> Brad wrote: >> Folks I am new so I apologize if I come off as a totaly tool. I am >> finding Rails to be an amazing framework to use and having fun >> with it. >> I have run into a frustrating snag however with PLUGINS. >> >> I have a plugin installed in: /myapp/vendor/plugins/ >> When I run: ruby script/server in /myapp/ my WEBrick starts >> normally and >> I can access IP:3000. I get the default rails index page. >> >> How do I "enable" the plugin? How do I tell the app to use it? I >> try to >> access the directories and I just get 404 not founds so obviously >> I am >> not doing it correctly. >> >> Insight and advice greatly appreciated. > > Anyone have any ideas? :( > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Normally, you don''t have to do anything to ''enable'' a plugin; when Rails starts up, the plugin''s init.rb file will be evaluated, and the plugin should do anything it needs at that point. Using a plugin depends from each to the next. Some provide new syntax or macro-esque methods that you can use in your controllers or models, in which case the plugin will probably do nothing until you make use of those features in your code. Which plugin is it that you''re trying to use? - james On 7/21/06, Brad <bradmad@cox.net> wrote:> Folks I am new so I apologize if I come off as a totaly tool. I am > finding Rails to be an amazing framework to use and having fun with it. > I have run into a frustrating snag however with PLUGINS. > > I have a plugin installed in: /myapp/vendor/plugins/ > When I run: ruby script/server in /myapp/ my WEBrick starts normally and > I can access IP:3000. I get the default rails index page. > > How do I "enable" the plugin? How do I tell the app to use it? I try to > access the directories and I just get 404 not founds so obviously I am > not doing it correctly. > > Insight and advice greatly appreciated. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- * J * ~