Tuesday, December 28, 2010

[Exception_notification For RAILS3 ] git://github.com/rails/exception_notification.git (at master) is not checked out. Please run `bundle install` (Bundler::GitError) [RESOLVED]

[Exception_notification For RAILS3 ] git://github.com/rails/exception_notification.git (at master) is not checked out. Please run `bundle install` (Bundler::GitError) [RESOLVED]

# Add to Gemfile

gem 'exception_notification', :git => "http://github.com/rails/exception_notification.git", :require => 'exception_notifier'

# Add following to config/application.rb or  config/initializers/exception_notification.rb
bash-3.2# cat config/initializers/exception_notification.rb
puts "======Excpetion Notification LOADED"
application3::Application.config.middleware.use ExceptionNotifier,
  :email_prefix => "Staging Capture ERROR: ",
  :sender_address => '"Notifier" ',
  :exception_recipients => ['shrikant.lokhande@gmail.com']

After "git pull" run "bundle install"

if got this Error do:
"bundle install vendor/bundler"

It will Fetch all the gems to bundler, error will go.

Fixed.

Monday, December 27, 2010

[Sinatra] `union': can't convert Array into String (TypeError) [Resolved]

For The Issue Please Do Following Stapes.

First uninstall gem Rack with all version.

# gem uninstall rack
Select gem to uninstall:
 1. rack-1.0.0
 2. rack-1.0.1
 3. rack-1.2.1
 4. All versions
> 4
Successfully uninstalled rack-1.0.0
Successfully uninstalled rack-1.0.1

You have requested to uninstall the gem:
        rack-1.2.1
thin-1.2.7 depends on [rack (>= 1.0.0)]
sinatra-1.1.2 depends on [rack (~> 1.1)]
oauth-0.3.5 depends on [rack (>= 0)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]  y
Successfully uninstalled rack-1.2.1

root@li107-124:/mnt/ntracker/ntrack# gem list rack
*** LOCAL GEMS ***

# gem install rack --version '1.2.0'
Successfully installed rack-1.2.0
1 gem installed
Installing ri documentation for rack-1.2.0...
Building YARD (yri) index for rack-1.2.0...
Installing RDoc documentation for rack-1.2.0...

Now check your application and config.ru with following content.
--------------------------
require 'sinatra'

Sinatra::Application.default_options.merge!(
  :run => false,
  :env => :production
)

require 'App'
run Sinatra.application
----------------------------

Then Start Application with web proxy thin or anything else.
(development environment)
# thin start -p 4500
>> Using rack adapter
>> Thin web server (v1.2.7 codename No Hup)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4500, CTRL+C to stop
>> Stopping ...

#Use -e for Env. Like this:

# thin start -p 4500 -e staging
or

To start:
# thin -C config/config.yml -R config.ru -e staging start
to stop:
# thin -C config/config.yml -R config.ru -e staging stop

As well as for production.

Thanks-