Alan Moment
  • Introduction
  • 智慧家庭
    • Fibaro 系統整合便宜的 IP Cam
  • Life
    • 用AWS Glacier做最後的冷資料備份
    • 如何在macOS修改影音檔日期
  • 3D Printer
    • Atom2.5EX 之血淚組裝
    • 列印經驗紀錄
      • SpoolHolder
    • 製圖經驗
      • Turntable
      • 重製Atom3散熱風扇
    • 線材經驗
      • PETG
        • 首測
  • Kubernetes
    • 使用Kops建立Kubernetes
    • 使用HelmV2
    • Kubernetes的技術問題排解技巧
  • PHP
    • 管理PHP Library的利器Composer
    • PHP安裝JSON
    • Phalcon首發
    • Gearman Job Worker for PHP
    • Laravel 首發 !!!
    • Data Encrypt & Decrypt
  • Python
    • Django + Python 開發環境建置
  • Android
    • Android zipcode library of maven
    • Android use foreign object of OrmLite
    • ProgressBar while loading ListView of Android
    • AsyncTask download image by the Android
    • Use Thread control Android UI
    • Android Universal Image Loader
  • Ruby on Rails
    • Install rmagick on the Windows of Ruby on Rails
    • Ruby on Rails deploy on Heroku
    • Ruby on Rails 小問題
  • React
    • Ditched AngularJS for React
  • Tessel
    • 很潮的 Tessel
    • Connect to Slack on Tessel
    • Baby Help on Tessel
  • Node.js
    • CentOS 安装 Node.js 0.8.5
  • OOAD
    • Injection Principle Design Pattern
  • Linux
    • SSH免密碼登入遠端電腦
    • Apache與Tomcat的結合
    • The bash auto build
  • Hadoop
    • CentOS 5.5 + Hadoop 0.20
    • CentOS 5.5 + Hbase 0.94.8
    • Hadoop + Hbase 叢集環境
    • Hadoop 溝通橋梁之 Thrift 0.7
    • 使用MapReduce之替代方案Hive
    • 使用Sqoop將MySQL資料匯入Hbase
  • Database
    • 吃足苦頭的Mssql
  • IDE
    • Netbeans console中文亂碼解決方法
    • 用NetBeans開發Ruby On Rails
  • Agile
    • 淺談我的Agile
  • 協作工具
    • 建置專屬自己的Github之Gitlab
    • Gitlab 4.1 upgrade to Gitlab 6.0超偷懶方法
    • Install Phabricator and run on the Gitlab
    • Phabricator 基本應用
    • Phabricator review code應用
    • Redmine之基本建置與Scrum應用
    • Omnibus Gitlab 7 基礎操作
    • Git Push Notify to Slack on Gitlab
    • phabricator-extensions-Sprint 無法抓到正確的 Story Points
  • 其他
    • 慶祝Octopress開張
    • 走在時尚的尖端! Ghost
    • 大搬家
    • 網頁教學初體驗
    • 網路攻擊很猖狂
Powered by GitBook
On this page
  • 下載RailsInstaller
  • 下載Ruby and Rails Plugin
  • 發生錯誤

Was this helpful?

  1. IDE

用NetBeans開發Ruby On Rails

PreviousNetbeans console中文亂碼解決方法NextAgile

Last updated 3 years ago

Was this helpful?

NetBeans除了能開發PHP、Java、..等等的這些程式語言,其實也早就有Plugin能支援開發Ruby哦。

下載RailsInstaller

有完整的開發環境。一包就搞定。

下載Ruby and Rails Plugin

從官網的下載完畢後從NetBeans的功能選項中選擇

Tools→Plugins

在安裝其他的plugins之前,必須先選擇安裝org-jruby-jruby.jar,讓NetBeans可以支援Ruby

再來安裝其他的plugins就不會出現錯誤訊息

全部安裝完畢後,就可以在功能選項中建立Ruby On Rails的Application囉。

File→New Project

雖然我使用NetBeans已經很長一段時間了,但是主要用他來開發PHP,開發PHP是很好用沒錯。要用他來開發RoR是有點勉強阿...

發生錯誤

6/23/2013 4:57:01 PM

建立project之後執行run,發現console有錯誤訊息如下

WARN  Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true

在C:\RailsInstaller\Ruby1.9.3\lib\ruby\1.9.1\webrick\httpresponse.rb搜尋

if chunked? || @header['content-length']

替換為

if chunked? || @header['content-length'] || @status == 304 || @status == 204

即可解決

6/23/2013 11:57:01 PM

當更改固定首頁的時候出現錯誤訊息如下

ExecJS::RuntimeError in Home#index

可以到C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\execjs-1.4.0\lib\execjs\runtimes.rb搜尋cscript //E:jscript //Nologo //U

JScript = ExternalRuntime.new(
	:name        => "JScript",
	:command     => "cscript //E:jscript //Nologo //U",
	:runner_path => ExecJS.root + "/support/jscript_runner.js",
	:encoding    => 'UTF-16LE' # CScript with //U returns UTF-16LE
)

替換成

JScript = ExternalRuntime.new(
		:name        => "JScript",
		:command     => "cscript //E:jscript //Nologo",
		:runner_path => ExecJS.root + "/support/jscript_runner.js",
		:encoding    => 'UTF-8' # CScript with //U returns UTF-16LE
)

Oct 4th, 2013 12:00:00pm

所以其實我裝完之後就沒再使用了,我個人比較推薦,畫面看起來也比較舒服。

參考:

參考:

Aptana Studio
http://richardjoo.wordpress.com/2013/01/15/warn-could-not-determine-content-length-of-response-body-set-content-length-of-the-response-or-set-responsechunked-true/
http://stackoverflow.com/questions/14283465/issue-with-upgrade-to-rails-3-2-11-execjsruntimeerror-in-static-pageshome
RailsInstaller
Plugins
plugins
org-jruby-jruby.jar
Ruby and Rails plugins
New Project