How do I run alternative Rails generators in NetBeans? - ruby-on-rails

Does anybody know how I can run alternative Rails generators in Netbeans 6.7? I have installed nifty-scaffold and want to want to find how I can run the following command from the IDE:
script/generate nifty_scaffold etc ....
I have installed the nifty-scaffold gem, but it does not appear in the drop-down list when I select 'Generate' for my project.
(I am running NetBeans on Windows)

It would be very easy to add new generator extensions in netbeans. Netbeans doesn't do it
automatically, you need to do it manually. I am using NetBeans ver 6.8 and installed nifty generators successfully in netbeans by following procedure:
1. Download gems file of ryanb's nifty generator freely available.
2. install in netbeans from tools->rubygems-> install Local
3. go to the directory C:\Program Files\NetBeans 6.8\ruby2\jruby-1.4.0\lib\ruby\gems\1.8\gems\rails-2.3.5\lib\rails_generator\generators\components. It shows all the generators available in netbeans.
4. go to the directory C:\Program Files\NetBeans 6.8\ruby2\jruby-1.4.0\lib\ruby\gems\1.8\gems\nifty-generators-0.3.0\rails_generators. It shows the nifty generators which you have just now installed.
5. Copy all nifty generators to components directory shown in step 3.
6. right click on project and click generate and you will find the udpated list of all new generators
By
Vikas Maan

I assume that when you say you installed the gem, you did so through the Generate...->Install Generators button?
However, it does seem to be a defect. I've tested it too on Windows & Netbeans 6.7 and reproduced your problem - Netbeans can't find the generators even though script/generate can. It's probably worth shooting an email off to the Ruby Netbeans mailing list and/or filing a bug here.

You can create a folder named "generators" in your "lib" folder and put any generator folders in it and it should be working.
Or put that "generators" folder in your "vendor" folder.

Link to nifty-generator GEM(version 0.3):
http://rubyforge.org/frs/?group_id=6986
I wasn't able to install local gem from github, but above link works.
It works with Rails 2.

Related

What considerations/solutions should be taken into account for setting up Sublime 2 for rails and ruby coding?

I have tried BBedit and RubyMine for building Rails apps and I would like to try out Sublime 2. What add ons should I include?
OK so this is what I found in different places
Establish that you access sublime from the command line
This is the actual set of answers that worked for me, note the version of Mac OSX and the version of Sublime Open Sublime Text from Terminal in macOS
Install the Package Controller
https://sublime.wbond.net/installation
Install the Soda theme from package controller
Install the following packages -> SCSS, ApplySyntax, Git and RSpec

netbeans - plugins require HTML Editor Library to be installed

I am attempting set up Netbeans 7.1 as my RoR editor. When trying to install plugins I get the following error:
Some plugins require plugin HTML Editor Library to be installed. The
plugin HTML Editor Library is requested in version >= 1.21 (release
version 1) but only 2.0.1 (of release version different from 1) was
found. The following plugin is affected:       
Embedded Ruby (RHTML)
I looked for this HTML plugin so I could install it but I can't seem to find it anywhere.
It seems that the Ruby on Rails plugin has some problem (i.e. does not support) Netbeans 7.1 and 7.2. But it works with version 6.9 and 7.
Reference: http://plugins.netbeans.org/plugin/38549/ruby-and-rails
If I'm not wrong this is the lovely 207075 from the bugtracker: https://netbeans.org/bugzilla/show_bug.cgi?id=207075
In fact there's a workaround for this issue:
http://blog.enebo.com/2012/01/workaround-for-ruby-support-on-netbeans.html
good luck.
If you want to install it on a newly downloaded Netbeans (7.1 in my case), you should first go to Tools > Plugins, select Updates Tab and install the updates. Then, after restart, you'll go to the mentioned above Plugins, and now you will able to install all the required updates (HTML Editor will be among them.)
Lastl thing, as #skripted already mentioned, just install the plugin by following the instructions on this page.

Ruby on Rails not working on Netbeans

I am trying to run RoR on Netbeans 7. I installed everything as given in the documentation. I have Ruby 1.9.2 and Rails 3.0.9 installed on my PC.
Also I have the plugins installed with the Netbeans 7.0
But when I try to create a new project, the progress hangs on 25% and Netbeans stops responding. I have to use task Manager to close the IDE. What is wrong in the scenario? Thank you.
Well help on this will be limited because netbeans no longer supports Rails:
http://netbeans.org/community/news/show/1507.html
Good news though, you don't need netbeans to create a rails project. Just open up your terminal and run:
rails new APP_NAME
Each time I have seen this happen Netbeans is happily awaiting input. When you create the project in Netbeans it executes rails new APP underneath and if that process asks a question, then Netbeans will hang. Check the Netbeans output window (if it's open). You can verify this by creating the rails app on the command line. Once you do that, open the directory with Netbeans and it should recognize the project as a Rails project.

how to configure netbeans for ruby on rails?

how to configure netbeans for ruby on rails ?
Update: Netbeans has dropped support for ruby, unfortunately.
The netbeans documentation has sections on that matter:
http://netbeans.org/kb/docs/ruby/setting-up.html
http://netbeans.org/kb/docs/ruby/rails-quickstart.html
Additional info. On Apache NetBeans IDE 11.1 it will work!! (latest version as of 2019)
You need to get a copy of org-jdesktop-layout-RELEASE82.nbm and install it first.
I found it in this directory on the bits.netbeans.org release site:
http://bits.netbeans.org/nexus/content/groups/netbeans/org/netbeans/api/org-jdesktop-layout/RELEASE82/
After it is installed, follow the directions above from Marcos Riveros and you should be good to go.
Google suggests:
http://wiki.netbeans.org/RubyOnRails
http://thoughtmining.blogspot.com/2007/03/installing-netbeans-with-rubyrails.html
Currently, if you download Netbeans 7.0.1 (not the latest), you can use Tools->Plugins to open the Plugins window. Click on "Available Plugins" and search for "Ruby on Rails". Select it, and click install.
Unfortunately, the current version of Netbeans, 7.1, will not offer the Ruby on Rails plugin to you on the Available Plugins tab. The following blog post gives some hope that it will eventually be there:
http://blog.enebo.com/2012/01/workaround-for-ruby-support-on-netbeans.html
In the meantime, use 7.0.1.
Try install plugins manually:
1. Download and unzip the plugins for you netbeans http://plugins.netbeans.org/plugin/38549/ruby-and-rails
2. Click to tools->plugings->Downloaded, add path-to-pluging-downloaded.
Firts install the jar plugins (org-jruby-jruby.jar) and second install the pluging *.nbm.

XCode - Ruby on Rails Project Templates

Where can I find project templates for Ruby on Rails to use within projects?
I am using Xcode version 3.2.2.
From what I understand, Apple stopped shipping all project templates with xcode and made them available as optional downloads, yet I cannot find the templates for Ruby on Rails anywhere.
Regards
Mick
Because the "template" of a fresh rails app can change from version to version, you should use the rails new myapp generator command at the Terminal, and the open the result in XCode organizer.
More here: http://developer.apple.com/tools/developonrailsleopard.html

Resources