FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

RoR under Windows: How to setup up an application with existing dependencies

 
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users
View previous topic :: View next topic  
Author Message
lacco



Joined: 12 Dec 2008
Posts: 1

PostPosted: Fri Dec 12, 2008 10:08 am    Post subject: RoR under Windows: How to setup up an application with existing dependencies Reply with quote

Hi!

I would like to develop an existing rails project with netbeans/ jruby under windows (up to now, I developed under Ubuntu without NetBeans). Before doing so, I would like to ask you if any of the dependencies of the application can make problems while setting the application up, or where I have to do some JRuby/ NetBeans-specific steps.

* Rails 2.1.1
* PostgresQL
* Sphinx
* RMagic
* RedCloth
* GetText
* Haml
* Json

Any hints on how to perform the steps would be very helpful, thank you!
Back to top
View user's profile Send private message
Erno Mononen
Posted via mailing list.





PostPosted: Fri Dec 12, 2008 11:04 am    Post subject: RoR under Windows: How to setup up an application with existing dependencies Reply with quote

Hi,

There was an issue with Rails 2.1.1 and JRuby 1.1.4, please see
http://markmail.org/message/yt4q6vypuppazsit for more info. I'm not sure
whether this is still an issue with JRuby 1.1.5 or whether just turning
ObjectSpace on does the trick (Nick?). In case upgrading is on option
for you, the latest Rails (2.2.2) is fully compatible with JRuby. Other
than that, I think there is RMagick for JRuby
(http://code.google.com/p/rmagick4j/), though I'm not sure whether that
is the best option -- alternatively you can use some Java library or
perhaps e.g. ImageScience. Both GetText and RedCloth should support
JRuby, not sure about Sphinx. Let's hope others will chime in.

Erno



lacco wrote:
Quote:
Hi!



I would like to develop an existing rails project with netbeans/ jruby under windows (up to now, I developed under Ubuntu without NetBeans). Before doing so, I would like to ask you if any of the dependencies of the application can make problems while setting the application up, or where I have to do some JRuby/ NetBeans-specific steps.



* Rails 2.1.1

* PostgresQL

* Sphinx

* RMagic

* RedCloth

* GetText

* Haml

* Json



Any hints on how to perform the steps would be very helpful, thank you!











Back to top
ReggieB



Joined: 21 Oct 2008
Posts: 31

PostPosted: Fri Dec 12, 2008 12:08 pm    Post subject: Reply with quote

You can create a new NetBeans Rails project using an existing Rails application structure.

So copy of the Rails application folder over to the Windows PC (or even better, book out a copy of the application from your version control system), and then create a new Netbeans project using the "Ruby on Rails Application with Existing Sources" option and point the system at the root of your Rails application.

Add-ons in the form of plug-ins shouldn't be a problem. They should be contained wholly within the vendor/plugins folder. Just make sure that gets copied across (I include these in my version control so that when I book out a copy to a new location, all the plug-ins come with it).

The problem is Add-ons that are installed into the Ruby directories (for example as gems). JRuby is installed with NetBeans and by default, that's the Ruby system NetBeans will point to. Therefore you have choice: Update the project properties to point at your own Ruby/JRuby install on the PC; or use the JRuby instance installed with NetBeans. Which ever you use, you then need to ensure your add-ons get put into the folders associated with that instance. I think NetBeans gems tool will do that for you.

If this is a fresh install, easiest thing would be to use the JRuby installed with NetBeans and use the NetBeans tool to install the Gems you need into the folders associated with those binaries.

Some standalone applications that you have in your list, just need to be installed on the XP system. For example, you'll need to install the RMagic application as well as the associated gem that allows communication between Ruby and RMagic.

If you host development tables on the local development machine, then install PostGres as an application and make sure the configuration matches that specified in database.yml (mainly port number, schema name, and user credentials).
Back to top
View user's profile Send private message
Chris Kutler
Posted via mailing list.





PostPosted: Fri Dec 12, 2008 4:38 pm    Post subject: RoR under Windows: How to setup up an application with existing dependencies Reply with quote

Here are a couple of differences to know about using JRuby:

You cannot use gems with native extensions.

For postgres, you probably want to install either the postgres_pr (pure
Ruby, that is no native extenstions) gem or the
activerecord-jdbcpostgresql-adapter gem. If you use the later, set the
adapater in the database.yml to jdbcpostgresql. See
http://www.netbeans.org/kb/docs/ruby/setting-up.html#dbservers for more
details.

When running command-line commands, it is best to use the form
<path-to-jruby-bin>/jruby -S <command>.

Erno Mononen wrote:
Quote:
Hi,

There was an issue with Rails 2.1.1 and JRuby 1.1.4, please see
http://markmail.org/message/yt4q6vypuppazsit for more info. I'm not
sure whether this is still an issue with JRuby 1.1.5 or whether just
turning ObjectSpace on does the trick (Nick?). In case upgrading is on
option for you, the latest Rails (2.2.2) is fully compatible with
JRuby. Other than that, I think there is RMagick for JRuby
(http://code.google.com/p/rmagick4j/), though I'm not sure whether
that is the best option -- alternatively you can use some Java
library or perhaps e.g. ImageScience. Both GetText and RedCloth should
support JRuby, not sure about Sphinx. Let's hope others will chime in.

Erno



lacco wrote:
Quote:
Hi!



I would like to develop an existing rails project with netbeans/
jruby under windows (up to now, I developed under Ubuntu without
NetBeans). Before doing so, I would like to ask you if any of the
dependencies of the application can make problems while setting the
application up, or where I have to do some JRuby/ NetBeans-specific
steps.



* Rails 2.1.1

* PostgresQL

* Sphinx

* RMagic

* RedCloth

* GetText

* Haml

* Json



Any hints on how to perform the steps would be very helpful, thank you!

















Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB