Installing Ruby On Rails plugin for FlashBuilder4
The Ruby On Rails plugin allows FlashBuilder4's DCD workflow to support AMF(Remoting) based services running on Ruby on Rails driven servers.
Installation of the plugin:
1.Download the plugin and unzip it.
2.Close FlashBuilder4 if it is running.
3.Go to the plugins directory.
- For standalone version of FlashBuiler4 it is located at:
- For plugin version of FlashBuilder4 it is located at:
4.Copy the plugin folder "com.adobe.flexbuilder.services.RORService_1.0.0" in the unzipped folder mentioned in "1." to the plugins directory mentioned in "2."
5. Restart FlashBuilder4.
ROR Service icon should now appear in the Connect to Data/Service wizard.
Setting up of the Rails project for use with this plugin:
Following steps assume that you already have ruby and rails installed on your system.
1. Get to your rails project on the command prompt. If have not created a rails project use something like "rails myrailsproject" to create one.
2. In order to make your ruby classes available as remoting(AMF) services we need to install an AMF library for this purpose. One such library is "WebOrb for rails" provided by The Midnight Coders.(http://www.themidnightcoders.com/products/weborb-for-rails/overview.html). We will be using this library for the examples, but the users are free to choose their own library of choice. However using WebOrb will make the understanding of the examples easier.
Install weborb in your project folder using the command:
ruby script/plugin install http://themidnightcoders.net:8089/svn/weborb
3. Run the server using: ruby script/server
If you get an error similar to:
c:/ruby/lib/ruby/gems/1.8/gems/actives
upport-2.2.2/lib/active_support/dependencies.rb:105:in `const_missing': uninitia
lized constant Rails::Plugin::Dependencies (NameError)
from F:/trails/m2/vendor/plugins/weborb/init.rb:30:in `evaluate_init_rb'
Then modify the file init.rb in /vendor/plugins/weborb/init.rb as:
Replace
Dependencies.mechanism = :load
with:
ActiveSupport::Dependencies.mechanism = :load
Reason of error: In the new Rails framework, Dependencies are part of ActiveSupport now
4.Make sure database.yml is edited and points to a running Database.
