|
|
Install
How to install d-rails
DEPRECATED: The install instructions are currently deprecated while we get the build and packaging system in place. We apologize for the inconvenience, but we hope to have this updated very soon with a new and improved distribution mechanism. -BR (3/25/08)
Installing the plugin from source
[bob@foobar www]$ cd bobremeika.com_rails/ bob@foobar bobremeika.com_rails]$ script/plugin source Added 0 repositories. [bob@foobar bobremeika.com_rails]$ script/plugin source http://d-rails.googlecode.com/svn/trunk/plugins/ Added 1 repositories. [bob@foobar bobremeika.com_rails]$ script/plugin install drails + ./MIT-LICENSE + ./README + ./Rakefile + ./app/config/drails.yml + ./assets/dojo_build/dojo.js + ./init.rb + ./install.rb + ./lib/drails.rb + ./lib/drails_file_utils.rb + ./lib/option_mapper.rb + ./lib/prototype_override.rb + ./public/javascripts/dojo/externals.txt + ./tasks/drails_tasks.rake + ./test/drails_test.rb + ./uninstall.rb **** d-rails: Installing d-rails... **** d-rails: Installing Dojo... **** d-rails: Dojo install directory: /srv/www/bobremeika.com_rails/public/javascripts/dojo **** d-rails: Copying d-rails config file to /srv/www/bobremeika.com_rails/config/drails.yml... **** d-rails: Copying Dojo d-rails build to install path... **** d-rails: Dojo installed successfully **** d-rails: d-rails installed successfully **** d-rails: Installed d-rails successfully! **** [bob@foobar bobremeika.com_rails]$
One step to configure
Add this to config/environment.rb right before the end statement in your Rails::Initializer.run block
# Added for d-rails
require 'yaml' # This is only needed when running the rake db:* commands
DRAILS_CONFIG = YAML.load(File.open(File.join(RAILS_ROOT, 'config', 'drails.yml'))) if eval("YAML")Troubleshooting
Did you get an error like this? If so, then you forgot to add the configuration variable in your application.
[bob@foobar bobremeika.com_rails]$ sudo mongrel_rails start
Password:
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
**** d-rails error: Most likely you forgot to add DRAILS_CONFIG to your environment.rb
/usr/lib64/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:478:in `const_missing': uninitialized constant Rails::Plugin::DRAILS_CONFIG (NameError)
from /srv/www/bobremeika.com_rails/vendor/plugins/drails/init.rb:6:in `evaluate_init_rb'
from /usr/lib64/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:79:in `evaluate_init_rb'
from /usr/lib64/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
from /usr/lib64/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:75:in `evaluate_init_rb'
from /usr/lib64/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:39:in `load'
from /usr/lib64/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin/loader.rb:33:in `load_plugins'
from /usr/lib64/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin/loader.rb:32:in `each'
from /usr/lib64/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin/loader.rb:32:in `load_plugins'
... 16 levels...
from /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/command.rb:212:in `run'
from /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:281
from /usr/bin/mongrel_rails:19:in `load'
from /usr/bin/mongrel_rails:19
Sign in to add a comment
