用sublime Text2来开发ruby on rails项目
2012-11-03 00:00
447 查看
喜欢用sublime的程序员们可以参考这儿来进行配置:
https://github.com/mhartl/rails_tutorial_sublime_text
搬运时间:2012年11月2日
This assumes that
Note the use of
On Linux (especially Ubuntu), the command is the same as for OS X; only the paths differ:
(You may have to replace the path to
On Linux Mint, take a look at Install Sublime Text 2 in Linux Mint.
On Windows, you can simply double-click the application icon. The setup at the command line depends on which shell you use; see if one of the techinques at the Stack Overflow discussion on Sublime Text from Command Line (Win7) works for you. You might also want to check out the video Easily Open Files from Windows Command Prompt with Sublime Text 2 (I suggest changing
Setup on Linux is similar, but with a different target directory for
On Windows, the target directory is as follows:
Note: If using Windows Vista, 7, or 8, you should first copy all the folders and files from the remote repo into your local temporary folder located at
In that file, change
to
https://github.com/mhartl/rails_tutorial_sublime_text
搬运时间:2012年11月2日
Rails Tutorial Sublime Text setup
These are the steps needed to set up Sublime Text 2 as in the Ruby on Rails Tutorial. Instructions are for OS X; Linux and Windows users should make substitutions as necessary. (This may require web searches. Please let me know if you find something that you think should be included here.)Command-line command
On OS X, you can set upsublas a command-line command by following the Sublime Text 2 instructions for the OS X command line:
$ ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
This assumes that
~/binis in your path. If isn't (which you can check using
echo $PATHat the command line) you can put
sublin
/usr/bin:
$ sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/bin/subl
Note the use of
sudo, which is required because ordinary users don't have permission to write to
/usr/bin.
On Linux (especially Ubuntu), the command is the same as for OS X; only the paths differ:
$ sudo ln -s ~/Applications/Sublime\ Text\ 2/sublime_text /usr/bin/subl
(You may have to replace the path to
sublime_textwith the correct one for your system.)
On Linux Mint, take a look at Install Sublime Text 2 in Linux Mint.
On Windows, you can simply double-click the application icon. The setup at the command line depends on which shell you use; see if one of the techinques at the Stack Overflow discussion on Sublime Text from Command Line (Win7) works for you. You might also want to check out the video Easily Open Files from Windows Command Prompt with Sublime Text 2 (I suggest changing
st2to
sublto be consistent with the instructions for the other platforms).
Basic configuration
Open up Sublime Text and use theViewmenu to modify the following settings:
View > Hide Minimap
View > Side Bar > Hide Side Bar
View > Layout > Columns: 2
Copy auxiliary files
$ cd /tmp $ git clone git@github.com:mhartl/rails_tutorial_sublime_text.git $ cp -r rails_tutorial_sublime_text/* \ ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/
Setup on Linux is similar, but with a different target directory for
cp:
$ cp -r rails_tutorial_sublime_text/* \ ~/.config/sublime-text-2/Packages/User/
On Windows, the target directory is as follows:
$ cd /tmp $ git clone git@github.com:mhartl/rails_tutorial_sublime_text.git $ cp -r .\rails_tutorial_sublime_text\* \ '~\AppData\Roaming\Sublime Text 2\Packages\User'
Note: If using Windows Vista, 7, or 8, you should first copy all the folders and files from the remote repo into your local temporary folder located at
C:\Users\User\AppData\Local\Temp. Then proceed to move these same files to
C:\Users\User\AppData\Roaming\Sublime Text 2\Packages\User.
Install Sass syntax highlighting
Follow the instructions at sublime-text-haml-sass.Set up the theme
SelectPreferences > Color Scheme > User > Railscasts
Install the Rails Tutorial snippets
https://github.com/mhartl/rails_tutorial_snippetsInstall Sublime Text Alternative Auto-completion
https://github.com/alexstaubo/sublime_text_alternative_autocompletionInstall SublimeERB
https://github.com/eddorre/SublimeERBInstall RubyTest
Follow https://github.com/maltize/sublime-text-2-ruby-tests. Then edit the file"Theme - Default/Widget.sublime-settings"in the
Library/Application\ Support/Sublime\ Text\ 2/Packagesdirectory:
$ cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages $ subl "Theme - Default/Widget.sublime-settings"
In that file, change
"color_scheme": "Packages/Theme - Default/Widgets.stTheme"
to
"color_scheme": "Packages/User/CustomTestConsole.tmTheme"
相关文章推荐
- Ruby on rails开发从头来(windows)(二)-创建项目和第一个Hello world
- Ruby on rails开发从头来(windows)(二)-创建项目和第一个Hello world
- Ruby on rails开发从头来(windows)(二)-创建项目和第一个Hello world
- 寻找Ruby on Rails项目兼职开发人员
- Ruby on Rails(ROR) 实例开发之一 创建开发项目环境
- 采用ruby on rails语言开发的开源项目管理工具redmine
- Ruby on rails开发从头来(windows)(二)-创建项目和第一个Hello world (修正原版错误)
- Ruby on rails开发从头来(windows)(二)-创建项目和第一个Hello world
- 搭建Ruby on Rails开发环境
- 受Ruby on Rails影响的PHP开发框架
- 使用InstantRails搭建Ruby On Rails开发环境
- 搭建 Ruby on Rails 开发环境
- Ruby on rails开发从头来(四十)- ActiveRecord基础(Boolean属性)
- 利用Radrails开发Ruby on Rails程序入门指南
- Ruby on rails开发从头来(windows)(五)-对输入进行验证 (修正原版错误)
- Ruby on rails开发从头来(windows)(八)-使用Session创建购物车
- Ruby on rails开发从头来(三十九)- ActiveRecord基础(访问属性)
- Ruby on rails开发从头来(五十)- ActiveRecord基础(更新记录)
- Ruby on rails开发从头来(四十七)- ActiveRecord基础(强大的find方法)
- [Ruby on Rails系列]1、开发环境准备:Vmware和Linux的安装