Hi, Please explain what are all the steps for implement Rails Engine. I am using Rails 3.1 and Ruby 1.9.3. Please help me... Thanks, kingston.s -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Hi all, I try to implement Rails Engine, but i get following error /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ railties-3.1.3/lib/rails/plugin.rb:87:in `block in <class:Plugin>'': "Sub-Engine" is a Railtie/Engine and cannot be installed as a plugin (RuntimeError) from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'' from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ railties-3.1.3/lib/rails/initializable.rb:30:in `run'' from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ railties-3.1.3/lib/rails/initializable.rb:55:in `block in run_initializers'' from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ railties-3.1.3/lib/rails/initializable.rb:54:in `each'' from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers'' from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ railties-3.1.3/lib/rails/application.rb:96:in `initialize!'' from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing'' from /home/kingston/broking_workspace/Rails-Engine/config/ environment.rb:5:in `<top (required)>'' from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'' from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'' from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'' from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'' from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'' from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'' from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ railties-3.1.3/lib/rails/application.rb:83:in `require_environment!'' from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ railties-3.1.3/lib/rails/commands.rb:39:in `<top (required)>'' from script/rails:6:in `require'' from script/rails:6:in `<main>'' i am using rails 3.1 and ruby 1.9.3 please tell the solution on this.. Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
It looks like you keep you engine in vendor/plugins directory. Move it to some other directory and add to gemfile like this: gem "engine_name", :path => "./path/to/engine" and you should be able to use it. On Thu, Mar 15, 2012 at 2:51 PM, kingston.s <jenorishstar@gmail.com> wrote:> Hi all, > > I try to implement Rails Engine, > > but i get following error > > > /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ > railties-3.1.3/lib/rails/plugin.rb:87:in `block in <class:Plugin>'': > "Sub-Engine" is a Railtie/Engine and cannot be installed as a plugin > (RuntimeError) > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ > railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'' > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ > railties-3.1.3/lib/rails/initializable.rb:30:in `run'' > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ > railties-3.1.3/lib/rails/initializable.rb:55:in `block in > run_initializers'' > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ > railties-3.1.3/lib/rails/initializable.rb:54:in `each'' > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ > railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers'' > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ > railties-3.1.3/lib/rails/application.rb:96:in `initialize!'' > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ > railties-3.1.3/lib/rails/railtie/configurable.rb:30:in > `method_missing'' > from /home/kingston/broking_workspace/Rails-Engine/config/ > environment.rb:5:in `<top (required)>'' > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ > activesupport-3.1.3/lib/active_support/dependencies.rb:240:in > `require'' > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ > activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block > in require'' > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ > activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block > in load_dependency'' > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ > activesupport-3.1.3/lib/active_support/dependencies.rb:640:in > `new_constants_in'' > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ > activesupport-3.1.3/lib/active_support/dependencies.rb:223:in > `load_dependency'' > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ > activesupport-3.1.3/lib/active_support/dependencies.rb:240:in > `require'' > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ > railties-3.1.3/lib/rails/application.rb:83:in `require_environment!'' > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo/gems/ > railties-3.1.3/lib/rails/commands.rb:39:in `<top (required)>'' > from script/rails:6:in `require'' > from script/rails:6:in `<main>'' > > i am using rails 3.1 and ruby 1.9.3 > please tell the solution on this.. > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > >-- Piotr Sarnacki http://piotrsarnacki.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Please ask questions like this on the rubyonrails-talk mailing list. Core is reserved for discussion about the actual framework itself, rather than applications/engines built on top of it. There''s also an engines guide you could read: http://guides.rubyonrails.org/engines.html On Thursday, 15 March 2012 at 11:25 AM, Piotr Sarnacki wrote:> It looks like you keep you engine in vendor/plugins directory. Move it to some other directory and add to gemfile like this: > > gem "engine_name", :path => "./path/to/engine" > > and you should be able to use it. > > On Thu, Mar 15, 2012 at 2:51 PM, kingston.s <jenorishstar@gmail.com (mailto:jenorishstar@gmail.com)> wrote: > > Hi all, > > > > I try to implement Rails Engine, > > > > but i get following error > > > > > > /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo (mailto:ruby-1.9.3-p0@rails-3.1.3-demo)/gems/ > > railties-3.1.3/lib/rails/plugin.rb:87:in `block in <class:Plugin>'': > > "Sub-Engine" is a Railtie/Engine and cannot be installed as a plugin > > (RuntimeError) > > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo (mailto:ruby-1.9.3-p0@rails-3.1.3-demo)/gems/ > > railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'' > > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo (mailto:ruby-1.9.3-p0@rails-3.1.3-demo)/gems/ > > railties-3.1.3/lib/rails/initializable.rb:30:in `run'' > > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo (mailto:ruby-1.9.3-p0@rails-3.1.3-demo)/gems/ > > railties-3.1.3/lib/rails/initializable.rb:55:in `block in > > run_initializers'' > > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo (mailto:ruby-1.9.3-p0@rails-3.1.3-demo)/gems/ > > railties-3.1.3/lib/rails/initializable.rb:54:in `each'' > > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo (mailto:ruby-1.9.3-p0@rails-3.1.3-demo)/gems/ > > railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers'' > > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo (mailto:ruby-1.9.3-p0@rails-3.1.3-demo)/gems/ > > railties-3.1.3/lib/rails/application.rb:96:in `initialize!'' > > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo (mailto:ruby-1.9.3-p0@rails-3.1.3-demo)/gems/ > > railties-3.1.3/lib/rails/railtie/configurable.rb:30:in > > `method_missing'' > > from /home/kingston/broking_workspace/Rails-Engine/config/ > > environment.rb:5:in `<top (required)>'' > > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo (mailto:ruby-1.9.3-p0@rails-3.1.3-demo)/gems/ > > activesupport-3.1.3/lib/active_support/dependencies.rb:240:in > > `require'' > > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo (mailto:ruby-1.9.3-p0@rails-3.1.3-demo)/gems/ > > activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block > > in require'' > > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo (mailto:ruby-1.9.3-p0@rails-3.1.3-demo)/gems/ > > activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block > > in load_dependency'' > > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo (mailto:ruby-1.9.3-p0@rails-3.1.3-demo)/gems/ > > activesupport-3.1.3/lib/active_support/dependencies.rb:640:in > > `new_constants_in'' > > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo (mailto:ruby-1.9.3-p0@rails-3.1.3-demo)/gems/ > > activesupport-3.1.3/lib/active_support/dependencies.rb:223:in > > `load_dependency'' > > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo (mailto:ruby-1.9.3-p0@rails-3.1.3-demo)/gems/ > > activesupport-3.1.3/lib/active_support/dependencies.rb:240:in > > `require'' > > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo (mailto:ruby-1.9.3-p0@rails-3.1.3-demo)/gems/ > > railties-3.1.3/lib/rails/application.rb:83:in `require_environment!'' > > from /home/kingston/.rvm/gems/ruby-1.9.3-p0@rails-3.1.3-demo (mailto:ruby-1.9.3-p0@rails-3.1.3-demo)/gems/ > > railties-3.1.3/lib/rails/commands.rb:39:in `<top (required)>'' > > from script/rails:6:in `require'' > > from script/rails:6:in `<main>'' > > > > i am using rails 3.1 and ruby 1.9.3 > > please tell the solution on this.. > > > > Thanks > > > > -- > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > > To post to this group, send email to rubyonrails-core@googlegroups.com (mailto:rubyonrails-core@googlegroups.com). > > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com (mailto:rubyonrails-core%2Bunsubscribe@googlegroups.com). > > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. > > > > > > -- > Piotr Sarnacki > http://piotrsarnacki.com > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com (mailto:rubyonrails-core@googlegroups.com). > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com (mailto:rubyonrails-core+unsubscribe@googlegroups.com). > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.