April 2013 archive

Connect MS SQL Server with Rails

To connect MS SQL Server with Ruby on Rails follow the below steps: SQL Server (2005 or higher recommended) Install the adapters and driver [code] gem install tiny_tds gem install activerecord-sqlserver-adapter [/code] Ensure the activerecord adapter and db driver gems are defined in your Gemfile [code] gem ‘tiny_tds’ gem ‘activerecord-sqlserver-adapter’ [/code]

Permanent link to this article: https://blog.openshell.in/2013/04/connect-ms-sql-server-with-rails/

Unable to create rails application with sqlserver

Could not find “config/databases/sqlserver.yml” in any of your source paths. Your current source paths are: $HOME/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.8/lib/rails/generators/rails/app/templates Error: Template sqlserver.yml file missing. Solution: Need to update sqlserver.yml file in the specific location to fix this issue. Step1: Download sqlserver.yml configuration file. Step2: Extract the downloaded zip file. Step3: Copy extracted sqlserver.yml configuration file into the location which …

Continue reading

Permanent link to this article: https://blog.openshell.in/2013/04/unable-to-create-rails-application-with-sqlserver/

YII – set default settings within module and controller

Which helps to overwrite default settings of module and controller. To set default controller, view, layout and theme. Set default controller within module [php] /** * @var string the default controller. */ public $defaultController = ‘controller_name’; [/php] To Set default layout, theme and views within controller, use the following commands. [php] /** * @var string …

Continue reading

Permanent link to this article: https://blog.openshell.in/2013/04/yii-set-default-settings-within-module-and-controller/