jejacks0n / mercury

Mercury Editor: The Rails WYSIWYG editor that allows embedding full page editing capabilities directly inline.
http://jejacks0n.github.com/mercury
Other
2.63k stars 530 forks source link

route config not included in .gem package #233

Closed solotimes closed 12 years ago

solotimes commented 12 years ago

The engine mounting is not functional in route.rb. I think it's because the config directory was removed when packing to .gem file and uploading to rubygems.org. (from 0.5.0 - 0.7.1).

I need to add these route definitions to my routes.rb manually as workaround

  match '/editor(/*requested_uri)' => "mercury#edit", :as => :mercury_editor

  scope '/mercury' do
    match ':type/:resource' => "mercury#resource"
    match 'snippets/:name/options' => "mercury#snippet_options"
    match 'snippets/:name/preview' => "mercury#snippet_preview"
  end
jejacks0n commented 12 years ago

Routes are now generated with the install generator. You should remove those routes and use the generator.

solotimes commented 12 years ago

I have run rails g mercury:install and it added mount Mercury::Engine => '/' to route.rb . But when I run rake routes, there's nothing under Routes for Mercury::Engine: I'am using rails 3.2.3.

jejacks0n commented 12 years ago

What version of rails are you using? I see it in 3.2.2 at least, and if you see the "Routes for Mercury::Engine" I expect it's properly supported. It's odd for sure.

On Jun 12, 2012, at 8:26 PM, solotimes wrote:

I have run rails g mercury:install and it added mount Mercury::Engine => '/' to route.rb . But when I run rake routes, there's nothing under Routes for Mercury::Engine:


Reply to this email directly or view it on GitHub: https://github.com/jejacks0n/mercury/issues/233#issuecomment-6291097

solotimes commented 12 years ago

It's really odd. When i use :git => https://github.com/jejacks0n/mercury.git as source in Gemfile , it works fine. So i think the problem is in the .gem package, and I can't find any route definitions in the package download form http://rubygems.org .

2012/6/13 Jeremy Jackson < reply@reply.github.com

What version of rails are you using? I see it in 3.2.2 at least, and if you see the "Routes for Mercury::Engine" I expect it's properly supported. It's odd for sure.

On Jun 12, 2012, at 8:26 PM, solotimes wrote:

I have run rails g mercury:install and it added mount Mercury::Engine => '/' to route.rb . But when I run rake routes, there's nothing under Routes for Mercury::Engine:


Reply to this email directly or view it on GitHub: https://github.com/jejacks0n/mercury/issues/233#issuecomment-6291097


Reply to this email directly or view it on GitHub: https://github.com/jejacks0n/mercury/issues/233#issuecomment-6292242