0

I am trying to made my own gem, but I am still getting an error,

Here is my gem structure: order - app - controllers - order_controller.rb - lib - order order.rb

And content of the order_controller.rb:

class Order::OrderController < ApplicationController
    def index
       puts "asd"
    end
end

I've got order gem added to the main application Gemfil.

I defined my root to lead to index action of that controller:

root :to => "order/order#index"

but when I try to access homepage I get:

uninitialized constant Order::OrderController

What I've done wrong?

user1074965
  • 235
  • 2
  • 7
  • I tried both ways, additionally I also tried solution described in [here](http://stackoverflow.com/questions/8689142/how-to-include-a-controller-with-a-ruby-on-rails-gem), but output is always the same... – user1074965 Jul 28 '12 at 11:59

1 Answers1

0

Did you run bundle install after adding the gem in the Gemfile? By the way, why are you making a gem for that structure instead of making a Rails project with that structure?

Core2Juan
  • 354
  • 1
  • 11