flash | 25 May 23:15
Picon

RoR with Reia

Hello,
would be possible to run RoR with Reia (
http://en.wikipedia.org/wiki/Reia_(programming_language) )?
Ray Boutotte | 29 Mar 23:38
Picon

Engines as Gems

I have a rails engine that works quite well. We use it internally for creating all our web apps to conform to the same UI look and feel, widgets, etc... Problem is that we want to deploy it as a gem for versioning. Is there a way to create the a gem out of a rails engine?

I tried, and was able to create a gem, but there were errors. Would be great if someone could point me to some documentation on this subject. I have searched and can't find anything. Seen a coupld engines like Clearance that do run as a gem but they are not too complex, they don't have any asset files, and I think that is the problem I was running into.

I vendered my gem to vendor/gems and it was complaining about finding the asset files I believe.

Thanks

_______________________________________________
Engine-Developers mailing list
Engine-Developers@...
http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
seth b | 9 Feb 22:43
Picon
Gravatar

The state of Rails 2.3 / Engines migrations

Hey everyone,

I've been out of the loop for a minute regarding engines, but I'm
looking to update Substruct to Engines 2.3/Rails 2.3 if possible.

My last investigation stopped when running into the migrations issue.
I'm wondering if there is a recommended way to handle engine
migrations / legacy migrations (001_my_migration.rb) with 2.3. The
official site mentions some "things being in the works" but I didn't
really see anything past that.

Any advice or a link to a blog post would be cool. Thanks much.

--------------------
http://subimage.com
http://twitter.com/subimage
Jonathan Rochkind | 14 Sep 18:22
Favicon

ApplicationHelper in engine?

So if I understand things right, my Engine plug-in can have a helper in 
it. And my app can provide a helper by the same name, and the two 
helpers will be merged together, any conflicting method names my app's 
helper with the same name will take precedence.

Is there a reason this wouldn't work for an ApplicationHelper in 
application_helper.rb ?

My engine provides an ApplicationHelper. That works fine as long as the 
app using it has no ApplicationHelper. But if the containing app does 
have an ApplicationHelper, they are NOT merged together, but instead 
only the containing app's ApplicationHelper is used, everything in the 
Engine's ApplicationHelper is lost and unavailable.

Can anyone shed some light on this?

Jonathan
Andrew Roth | 7 Sep 16:04
Picon
Gravatar

using a generator to handle migrations

James, on your presentation at railsconf (http://rails-engines.org/news/2009/05/18/engines-at-railsconf/) you suggest (for now) making your own generator to handle the migrations issue.  Can you elaborate on that method?

_______________________________________________
Engine-Developers mailing list
Engine-Developers@...
http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
John Koleszar | 11 Aug 17:09
Favicon

relative_url_root in Engines::RailsExtensions::AssetHelpers.plugin_asset_path

Hi,

I have a rails app (redmine) running within a sub-uri via the following
directive in environment.rb:

ActionController::AbstractRequest.relative_url_root = "/redmine" 

Unfortunately, URLs generated for plugin assets by Engines do not honor
this directive. I don't know Rails, but it seems like an easy fix if you
know how to get at the request object from within Engines. I was
thinking of something along these lines:

===================================================================
--- vendor/plugins/engines/lib/engines/rails_extensions/asset_helpers.rb
(revision 2796)
+++ vendor/plugins/engines/lib/engines/rails_extensions/asset_helpers.rb
(working copy)
@@ -109,5 +109,5 @@
   # Returns the publicly-addressable relative URI for the given asset,
type and plugin
   def self.plugin_asset_path(plugin_name, type, asset)
     raise "No plugin called '#{plugin_name}' - please use the full name
of a loaded plugin." if Engines.plugins[plugin_name].nil?
-
"/#{Engines.plugins[plugin_name].public_asset_directory}/#{type}/#{asset}"
+
"#{@controller.request.relative_url_root}/#{Engines.plugins[plugin_name].public_asset_directory}/#{type}/#{asset}"
   end

Can someone point me in the right direction?

Thanks,

John
James Adam | 20 Apr 12:38
Gravatar

Rails.plugins

One of the handy things missing from Rails, that the engines plugin  
tries to provide but which isn't really core to its functionality, is  
a way of inspecting the set of loaded plugins while the application is  
running.

This is achieved via the Engines.plugins method (which is again  
aliased as Rails.plugins, for backwards compatibility). We use this  
mostly when dealing with public assets from within plugins, but it's  
also useful for generating RDoc for plugins.

In fact, the only thing the custom engines plugin loader does is to  
add plugins to this set, so if Rails itself implemented it, we could  
simplify the plugin greatly. Maybe even get rid of the 'boot' line,  
which needs to be added to the top of environment.rb!

Here's my ticket, hidden under the guise of being about the plugin  
documentation task: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2526-generated-plugin-rdoc-should-include-all-code-within-plugin-load_paths

Feedback appreciated,

James
James Adam | 20 Apr 12:12
Gravatar

Engines 2.3 compatibility

Hi all,

I've just made the appropriate changes to bring the engines plugin  
into compatibility with Rails 2.3, and the engine features it  
implements. You can find these changes in the 'edge' branch of the git  
repository, which I'm currently working on now.

The most notable change within your engine plugins is that I've  
removed the custom routes handling from the engines plugin, in favour  
of the implementation supplied by Rails itself. This means that your  
routes should now be in config/routes.rb, rather than the plugin root,  
and that map.from_plugin is no longer implemented.

The main reason for removing this is that I'm not very comfortable  
patching Rails to change existing behaviour like this; it was simpler  
when Rails didn't provide any plugin routing, but I'm keen not to  
result in two kinds of engine plugins - ones that require the engines  
plugin itself, and others that work with Rails out-of-the-box.

If the community feels that controlling the positioning of the routes  
is necessary, we should be pursuing this as part of the Rails core  
implementation, i.e. with tickets and patches and +1s.

I've also properly removed support for 'code_paths' in the plugin -  
there are simpler and more obvious ways to support this.

I am keen to smoothly transition as much of the key functionality as  
possible from the engines plugin into Rails itself. What remains,  
IMHO, is the following:

   * a Rails.plugins map of loaded plugins
   * Migrations support
   * Public asset support

The major feature missing here is the 'code-mixing', which is  
basically a short cut for requiring a controller/helper from the  
plugin before reopening the class again in the application.

There's already been some discussion on the Rails lighthouse instance  
about migrations, but without any suitable resolution. I'd be grateful  
to hear any ideas or thoughts you might have, either specifically  
about these features, or about this process in general.

Thanks again for your support,

James
Tekin Suleyman | 26 Nov 16:15
Picon
Gravatar

Interesting developments on the edge!

http://github.com/rails/rails/commit/63d8f56774dcb1ea601928c3eb6c119d359fae10

Tekin Suleyman

Freelance Ruby on Rails Developer
+44 (0) 7968 355 460
http://tekin.co.uk





_______________________________________________
Engine-Developers mailing list
Engine-Developers@...
http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
Ned Schwartz | 5 Nov 23:24
Favicon

What is the state of support for rails 2.2?

Hello,


I am trying to help get the project Adva-CMS (http://adva-cms.org/) up to date and ready for Rails 2.2.

Adva relies heavily on Engines and uses a fork that Sven Fuchs made to get timestamped migrations to work.

I see that the incompatibility with rails 2.2 has been addressed on the edge branch on github: http://github.com/lazyatom/engines/commit/499ce3b0480d8fa9375203f5efcadb8cf6ea9efe

My question is, what state is edge Engines in? and is the timestamped migrations issue fixed in edge Engines?

I would like to re-integrate the base Engines repo into Adva-CMS if I could, but if it is not feasible, I could patch Sven's fork and keep using that. 

Please advise

--
Wishingline Design Studio, Inc
http://www.wishingline.com
1402 Queen Street East, Unit C2 Toronto, Ontario M4L1C9 Canada
ned-C77rV2rxTfRfOZc0+OmrVg@public.gmane.org
_______________________________________________
Engine-Developers mailing list
Engine-Developers@...
http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
Mark Maglana | 13 Oct 05:22
Picon
Gravatar

Force reload assets

Hi all,

What's the best way to always reload the assets (javascript + css)  
when in the development environment? I'm developing a plugin for  
Redmine that relies heavily on javascript for interactivity and would  
like to avoid having to restart the server everytime I modify the js.

Regards,

Mark

Gmane