lamikae / caterpillar

Caterpillar helps you to deploy Rails apps on Liferay
http://rails-portlet.rubyforge.org/
Other
13 stars 5 forks source link

Start working towards rails 3 #2

Open escobera opened 12 years ago

escobera commented 12 years ago

Hello @lamikae ,

will you ever maintain this project again? Is it ok if I work on it towards rails 3/ruby 1.9 compatibility on my fork? Sorry to open an issuehere, but I didn't find your e-mail on your page.

lamikae commented 12 years ago

Hi there, Rails3 support has been on my TODO-list for a long time now, but not as a top priority one, sorry. I do have been working on other Rails3 projects though. There are a lot of hacks in Caterpillar that try to work around Rails2 plugin limitations that are really quite rendundant with Rails3, so I think that a whole new version that is incompatible with Rails2 would be appropriate. Sure, if you want to have a go, I'll take a look and can help where I can.

escobera commented 12 years ago

I'm trying to make a rails 3 app run on liferay 6.1. I've changed caterpillar a lot to achieve that, I generated the xml and war but when I add the portlet the portal tries to request "itself" on localhost:8080. And as you can imagine the rails portlet is not even touched, any idea how can I fix this?

lamikae commented 12 years ago

Basically, you should be able to reach the plain Rails app with your browser, or curl. The url depends on whether you run Rails as a separate process (through nginx or other frontend, or even WebRick) or inside the Java process with JRuby. If you opt for JRuby inside JBoss or Tomcat (etc), you need to prepend the name of your servlet into the path before the actual Rails route. This is an option in caterpillar config for Rails 2.

When you find the correct route (Rails responds to your browser without going through Liferay), configure the xml files and the portlet should show your view.

The latest rails-portlet.jar should work with Liferay 6. Caterpillar is a helper to automate the manual task of configuring the xml, and you should get Rails 3 up and running with Liferay 6.1 even without it. It's great that you have done work on bringing Caterpillar to work with the current Rails. :) Send me a link to your fork when you've stabilised it.

escobera commented 12 years ago

To be able to get the test bench inside the app routes without too many hacks I had to start a new rails engine project and pull code from caterpillar. I did some stuff with the tasks that you may not agree (I decided not to go warbler's way and expose the tasks directly to rake). All in all I don't know if what I did will fit with your original idea, so I created another gem called Moth. I hope you're ok with that, but if you find that this code really belongs here we can see how to fit it in a branch of some sorts. The code is far from stable but right now it is able to generate and deploy the xml and generate the .war. But I haven't been able to deploy the war properly.

Aside from that I don't think this is the best place for this discussion, is there an email address I can use to get in touch with you?

escobera commented 12 years ago

I tried everything in my toolchain here. Looks like I got pretty close, but the urls don't work. I always get a 404. Do I have to use some liferay special urls?