Ruby 如何:在Aptana中编译Coffeescript

Ruby 如何:在Aptana中编译Coffeescript,ruby,coffeescript,aptana,compass-sass,blueprint,Ruby,Coffeescript,Aptana,Compass Sass,Blueprint,我安装了Aptana,我想试试Coffeescript。当我尝试“编译并显示JS”时,它不会工作-控制台显示: ....xyz.sh: line 3: coffee: command not found ....xyz.sh: line 3: pre: command not found 我不明白-我如何让它运行 谢谢大家! 编辑: $ gem install compass $ compass create myProject --using blueprint $ gem install

我安装了Aptana,我想试试Coffeescript。当我尝试“编译并显示JS”时,它不会工作-控制台显示:

....xyz.sh: line 3: coffee: command not found
....xyz.sh: line 3: pre: command not found
我不明白-我如何让它运行

谢谢大家!

编辑:

$ gem install compass
$ compass create myProject --using blueprint
$ gem install bundle
$ bundle init //to create the gemfile
$ gem install coffee-script
$ gem install coffee-script-source
从昨天开始,我设法让compass/sass在Aptana中运行(是的!)-因此我意识到我的问题可能是错误的:我必须告诉Aptana(Windows?)在哪里可以找到编译器吗

编辑2:

$ gem install compass
$ compass create myProject --using blueprint
$ gem install bundle
$ bundle init //to create the gemfile
$ gem install coffee-script
$ gem install coffee-script-source
意识到:问题是-如何安装此gem(如果可能,在Aptana中): 通过 我在安装guard gem时出错:

ERROR:  Error installing guard:
    The 'ffi' native gem requires installed build tools.

在尝试了一些东西之后,这里有一个小教程,用于在Aptana中为一个项目设置指南针和咖啡脚本:

(信息:我对编码或ruby知之甚少,所以请耐心点:)

创建项目(我选择基本web模板)

终端:

$ gem install compass
$ compass create myProject --using blueprint
$ gem install bundle
$ bundle init //to create the gemfile
$ gem install coffee-script
$ gem install coffee-script-source
检查:

您还必须设置一些其他内容: 我找到了这一页,接着看了一遍

安装捆绑包:

$ gem install compass
$ compass create myProject --using blueprint
$ gem install bundle
$ bundle init //to create the gemfile
$ gem install coffee-script
$ gem install coffee-script-source
安装防护装置:

$ gem install compass
$ compass create myProject --using blueprint
$ gem install bundle
$ bundle init //to create the gemfile
$ gem install coffee-script
$ gem install coffee-script-source
您需要在之前安装Ruby Devkit-请检查以下链接:

如果你这样做了

$ gem install guard
$ gem install guard-coffeescript
我还安装了一个JS引擎,建议如下:

咖啡脚本:

$ gem install compass
$ compass create myProject --using blueprint
$ gem install bundle
$ bundle init //to create the gemfile
$ gem install coffee-script
$ gem install coffee-script-source
然后你必须编辑这个文件,我的文件是这样的:

# A sample Gemfile
source "https://rubygems.org"

# gem "rails"
group :development do
  gem 'guard'
end

group :development do
  gem 'guard-coffeescript'
end

group :development do
  gem 'therubyrhino'
end
运行包

$ bundle
创建guardfile

$ guard init
# A sample Guardfile
# More info at https://github.com/guard/guard#readme

guard 'coffeescript', :input => 'myProject/coffeescript', :output => 'myProject/javascript'
编辑guardfile

$ guard init
# A sample Guardfile
# More info at https://github.com/guard/guard#readme

guard 'coffeescript', :input => 'myProject/coffeescript', :output => 'myProject/javascript'
你可以用

$ guard start

这对我有用!如果你看到任何错误,请告诉我

虽然aptana对你的问题没有帮助,但是aptana的支持有点疯狂,它对我来说很有用,但我还是更喜欢一个nodejs脚本,它可以监视文件夹并在更改时自动编译——最好是一个垂直拆分,带有像js2coffee.orgThank这样的实时预览——默认情况下我是一个设计师,并尝试学习一些新东西。问题是-有不同的解决方案,但很多对我来说听起来像阿尔巴尼亚语。(Ruby、命令行操作、nodeJs…)js2coffee很好,如果没有更好的解决方案,我将使用它。如果您在windows上,您可能对该线程感兴趣:;)谢谢-但是我必须用Phython来做这个,不是吗?