This project is read-only.

Condition:Installed NougakuDo.

1.Creating a new application.
- Launch start menu-NougakuDo-Prompt.
- Enter "rails new hello" command. "hello" is a application name.

2.Setup tiny tds.
- Enter "tds_setup hello" command. "hello" is a application name.
Note: NougakuDo 1.1.x include "tds_setup.bat".
This command details is "replace database.yml to SQL Server templates" and "create a create_db task".

3.Creating new controller.
- Enter "cd hello" command. change current directory to application directory.
- Enter "railse generate controller home index" command.

4.Edit "config/rututes.rb".
- Replace "# root :to => 'welcome#index'" to "root :to => 'home#index'".

5.Delete "public/index.html".

6.Edit "config/database.yml".
- Setting SQL Server database infornation.

7.Creating new scaffold controller.
- Enter "rails generate scaffold Greeting name:string comment:text" command.

8.Execte "create database" of rake task.
- Enter "rake db:create_db" command.
Note: not support tds_setup, so use SQL Server Management Studio.

9.Execute migrate of rake task.
- Enter "rake db:migrate" command.

10.Edit "app/views/index.html.erb".
- Add "<%= linkto "please message", greetingspath %>" as link item of greeings controller.

11.Run server.
- Launch start menu-NougakuDo-NougakuDo.
- Click OK on UAC DialogBox.
- Select config.ru of railse application( example, hello is %APPDATA%\hello).
- Setting environment and # of process.
- Click Launch. (Start server)

12.assets precompile befor production environment.
- Enter "rake assets:precompile" command.
Notice: This command need Ruby on Rails 3.1.x. So not need for Ruby on Rails 3.0.x. If use Rails 3.1.1 , befor "precompile" command, need to install JRE 6 and to execute "use_closure application root" command. This command include NougakuDo 1.1.9. This is for uglifier-1.0.4's bug. Another solution is "set false to config.assets.compress".

Additional Information: uglifier-1.1.0 fixed bug of using JScript. If install uglifier-1.1.0, no need "use_closure" command.

13.Edit config/environment/production.rb file.
- set true to config.serve_static_assets.

14.Edit config/application.rb, if use rails 3.0.x (NougakuDo 1.0.5).
- add "config.action_controller.asset_path = 'application root%s'" line.

About Virtual Host mode and Sub directory Mode of NougakuDo.
NougakuDo 1.1.x support Virtual Host mode. Virtual host mode is default of Ruby on Rails. So sub directory mode is RAILSRELATIVEURL_ROOT setting. But sub directory mode need that notation of url must have relative url. Url mapping is follow.
- notation => real mapping
- rails.png => app/assets/images/rails.png
- home.js => app/assets/javascript/home.js
Of coruse, Virtul host mode don't care notation of url. So RAILSRELATIVEURL_ROOT setting established by Nougakudo.hta automatically.

Last edited Nov 26, 2011 at 1:30 AM by arai, version 7

Comments

No comments yet.