Routing error

Hello All,

I am getting a routing error for every new project I start. I have
searched tons for this issue but have come up with nothing that will
remedy my problem. I am using RubyStack on a vista machine. Below in my
routes.rb let me know what else I can give you for help. Thanks

ActionController::Routing::Routes.draw do |map|

The priority is based upon order of creation: first created ->

highest priority.

Sample of regular route:

map.connect ‘products/:id’, :controller => ‘catalog’, :action =>

‘view’

Keep in mind you can assign values other than :controller and

:action

Sample of named route:

map.purchase ‘products/:id/purchase’, :controller => ‘catalog’,

:action => ‘purchase’

This route can be invoked with purchase_url(:id => product.id)

You can have the root of your site routed by hooking up ‘’

– just remember to delete public/index.html.

map.connect ‘’, :controller => “welcome”

Allow downloading Web Service WSDL as a file with an extension

instead of a file named ‘wsdl’

map.connect ‘:controller/service.wsdl’, :action => ‘wsdl’

Install the default route as the lowest priority.

map.connect ‘:controller/:action/:id.:format’
map.connect ‘:controller/:action/:id’
end

Um, the actual routing error would be brilliant, also the version number
of
Rails that you’re running on right now.

You haven’t uncommented the default route line:

map.connect ‘’, :controller => “welcome”

You need to uncomment this line and change the controller to the
controller
you would like to serve your default requests.

On Dec 18, 2007 4:11 PM, is ea [email protected] wrote:

ActionController::Routing::Routes.draw do |map|

map.purchase ‘products/:id/purchase’, :controller => ‘catalog’,

Install the default route as the lowest priority.

map.connect ‘:controller/:action/:id.:format’
map.connect ‘:controller/:action/:id’
end

Posted via http://www.ruby-forum.com/.


Ryan B.
http://www.frozenplague.net

Hi all,

I’m about to start work on a Rails application (I’m currently in the
planning stages) and would like some advice.

One of the requirements is to provide an add-in system that a
non-technical user can work with. The concept is similar to the way that
Wordpress allows a user to install plugins. Once the user has installed
the plugin in the plugins directory, Wordpress automatically detects the
plugin. The user doesn’t have to do anything else to be able to use the
plugin other than activate it.

What I’d like to do with my application is something similar by allowing
the admin to import an add-in and then start using it without having to
do any programming. S/he certainly shouldn’t have to go in and modify
the application.

I was thinking of using the following structure/process for this.

  •     The application would have an add-ins directory (separate from
    

the Rails plugins) which would be the add-in repository. This could be
at a different location from the Rails application.

  •     The application would detect the add-in in this directory and
    

provide the details to the admin who could then install it. If there is
a database change involved, perhaps migrations could be used.

  •     The add-in would then be accessible from the appropriate
    

places in the application. It would install pages in the admin section
for instance to allow the administrator to change settings.

  •     The addins can be designed as a single function for simple
    

functionality, or as using the Rails MVC functionality for a more
complex add-in.

My questions are:

  1. Is this feasible?

  2. Would I be fighting Rails to do this?

  3. Are there any resources around that describe how something like this
    can be done?

  4. Is there anything else I should know about doing this?

Cheers

John

“Warning:
The information contained in this email and any attached files is
confidential to BAE Systems Australia. If you are not the intended
recipient, any use, disclosure or copying of this email or any
attachments is expressly prohibited. If you have received this email
in error, please notify us immediately. VIRUS: Every care has been
taken to ensure this email and its attachments are virus free,
however, any loss or damage incurred in using this email is not the
sender’s responsibility. It is your responsibility to ensure virus
checks are completed before installing any data sent in this email to
your computer.”

On 18 Dec 2007, at 06:19, JUDD, John wrote:

anything else to be able to use the plugin other than activate it.
could be at a different location from the Rails application.
functionality, or as using the Rails MVC functionality for a more
complex add-in.

My questions are:

You might want to look at the engines plugin. IIRC it does allow you
to pluginize migrations, controllers etc…

Fred

Thanks Fred, I’ll check that out.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs