require ibm_db specified module could not be found - database

I’m trying to install the “ibm_db” gem and verify the installation. I’m running on Windows 7 and I’m trying to use 32bit for everything. The database that I need to connect to is DB2 on an IBM iSeries. Below are the steps I’m using so far.
• gem install “ibm_db”
• irb
• require “ibm_db”
I get the following results:
c:\Users\Bob\RubymineProjects\beginruby>gem install ibm_db
Fetching: ibm_db-2.5.11-x86-mingw32.gem (100%)
Successfully installed ibm_db-2.5.11-x86-mingw32
1 gem installed
Installing ri documentation for ibm_db-2.5.11-x86-mingw32...
Installing RDoc documentation for ibm_db-2.5.11-x86-mingw32...
c:\Users\Bob\RubymineProjects\beginruby>gem list
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.2.9, 3.2.7, 3.2.3, 3.1.8, 3.0.12, 3.0.1)
actionpack (3.2.9, 3.2.7, 3.2.3, 3.1.8, 3.0.12, 3.0.1)
activemodel (3.2.9, 3.2.7, 3.2.3, 3.1.8, 3.0.12, 3.0.1)
activerecord (3.2.9, 3.2.7, 3.2.3, 3.1.8, 3.0.12, 3.0.1)
activeresource (3.2.9, 3.2.7, 3.2.3, 3.1.8, 3.0.12, 3.0.1)
activesupport (3.2.9, 3.2.7, 3.2.3, 3.1.8, 3.0.12, 3.0.1)
addressable (2.3.2)
annotate (2.5.0, 2.4.1.beta1, 2.4.0)
archive-tar-minitar (0.5.2)
arel (3.0.2, 2.2.3, 2.0.10, 1.0.1)
autotest (4.4.6, 4.3.2)
autotest-fsevent (0.2.8)
autotest-growl (0.2.16)
autotest-rails (4.1.2)
autotest-rails-pure (4.1.2, 4.1.0)
bcrypt-ruby (3.0.1 x86-mingw32)
bigdecimal (1.1.0)
bootstrap-sass (2.2.1.1, 2.0.0)
bootstrap-will_paginate (0.0.9, 0.0.6)
builder (3.1.4, 3.0.4, 2.1.2)
bundler (1.2.3, 1.0.22)
capybara (2.0.1, 2.0.0, 1.1.3, 1.1.2)
childprocess (0.3.6)
coderay (1.0.8)
coffee-rails (3.2.2, 3.1.1)
coffee-script (2.2.0)
coffee-script-source (1.4.0)
columnize (0.3.6)
cucumber (1.2.1)
cucumber-rails (1.3.0, 1.2.1)
database_cleaner (0.9.1, 0.7.0)
debugger-ruby_core_source (1.1.5)
diff-lcs (1.1.3)
erubis (2.7.0, 2.6.6)
excon (0.16.10)
execjs (1.4.0)
factory_girl (4.1.0, 2.3.2, 1.3.3)
factory_girl_rails (4.1.0, 1.4.0, 1.0)
faker (1.1.2, 1.0.1, 0.3.1)
ffi (1.2.0 x86-mingw32, 1.1.5 x86-mingw32)
gherkin (2.11.5 x86-mingw32)
gravatar_image_tag (1.1.3, 1.0.0.pre2, 0.1.0)
guard (1.5.4)
guard-rspec (2.3.1, 2.3.0, 0.5.5)
guard-spork (1.4.0, 0.3.2)
heroku (2.33.3, 2.33.2, 2.33.1)
heroku-api (0.3.7, 0.3.6)
hike (1.2.1)
hpricot (0.8.6)
i18n (0.6.1, 0.5.0, 0.4.2)
ibm_db (2.5.11 x86-mingw32)
io-console (0.3)
journey (1.0.4)
jquery-rails (2.1.4, 2.1.3)
json (1.7.5, 1.5.4)
launchy (2.1.2)
libwebsocket (0.1.7.1, 0.1.6.1, 0.1.6)
linecache19 (0.5.13, 0.5.12)
listen (0.6.0, 0.5.3)
lumberjack (1.0.2)
mail (2.5.3, 2.5.2, 2.4.4, 2.3.3, 2.2.19)
method_source (0.8.1)
mime-types (1.19)
minitest (4.3.3, 4.3.2, 2.5.1)
multi_json (1.5.0, 1.4.0, 1.3.7, 1.2.0)
netrc (0.7.7)
nokogiri (1.5.5 x86-mingw32)
pg (0.14.1 x86-mingw32, 0.12.2 x86-mingw32)
polyglot (0.3.3)
pry (0.9.10 i386-mingw32)
rack (1.4.1, 1.3.6, 1.2.5)
rack-cache (1.2)
rack-mount (0.8.3, 0.6.14)
rack-ssl (1.3.2)
rack-test (0.6.2, 0.5.7)
rails (3.2.9, 3.0.12, 3.0.1)
railties (3.2.9, 3.2.7, 3.2.3, 3.1.8, 3.0.12, 3.0.1)
rake (10.0.3, 10.0.2, 10.0.1, 0.9.2.2)
rbx-require-relative (0.0.9)
rdiscount (1.6.8)
rdoc (3.12, 3.9.4)
RedCloth (4.2.9 x86-mingw32)
rest-client (1.6.7)
rspec (2.12.0, 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.12.0, 2.6.0)
rspec-mocks (2.12.0, 2.10.1, 2.9.0, 2.6.0)
rspec-rails (2.12.0, 2.6.1)
ruby-debug-base19x (0.11.30.pre10)
ruby-debug-ide (0.4.17.beta14)
ruby_core_source (0.1.5)
rubyzip (0.9.9)
sass (3.3.0.alpha.16, 3.2.4, 3.2.3)
sass-rails (3.2.5, 3.2.4, 3.1.6)
selenium-webdriver (2.27.1, 2.26.0)
slop (3.3.3)
spork (0.9.2, 0.9.0.rc8 x86-mingw32)
sprockets (2.8.1, 2.2.2, 2.2.1, 2.1.3, 2.0.4)
sqlite3 (1.3.6 x86-mingw32, 1.3.5 x86-mingw32, 1.3.4 x86-mingw32)
sqlite3-ruby (1.3.3)
sys-uname (0.9.0 x86-mingw32)
thor (0.16.0, 0.14.6)
tilt (1.3.3)
treetop (1.4.12)
tzinfo (0.3.35)
uglifier (1.3.0, 1.2.3)
webrat (0.7.3, 0.7.1)
websocket (1.0.4, 1.0.3, 1.0.2)
will_paginate (3.0.3, 3.0.pre2)
win32-process (0.7.0)
win32console (1.3.2 x86-mingw32)
xpath (1.0.0, 0.1.4)
ZenTest (4.8.3, 4.8.2)
c:\Users\Bob\RubymineProjects\beginruby>irb
irb(main):001:0> gem 'ibm_db'
=> true
rb(main):002:0> require 'ibm_db'
LoadError: 126: The specified module could not be found. - C:/Ruby193/lib/ruby
/gems/1.9.1/gems/ibm_db-2.5.11-x86-mingw32/lib/mswin32/rb19x/ibm_db.so
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:i
n `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:i
n `rescue in require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:i
n `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/ibm_db-2.5.11-x86-mingw32/lib/m
swin32/ibm_db.rb:1:in `<top (required)>'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:i
n `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:i
n `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/ibm_db-2.5.11-x86-mingw32/lib/i
bm_db.rb:1:in `<top (required)>'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:i
n `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:i
n `require'
from (irb):2
from C:/Ruby193/bin/irb:12:in `<main>'
irb(main):003:0>

Put in your irb console (windows):
require 'mswin32/ibm_db'
conn = IBM_DB::connect("DATABASE","db2admin","password")
Of course, you can do any operation with this connection from irb for test your ibm_db gem, for example if it working correctly.

Related

How to solve this " `spawn': Exec format error - bin/rails server -p 3000 (Errno::ENOEXEC)" in Rails

I am trying to connect my Rails application with React and I'm almost done with the setup but each time I run the ./bin/dev command, I get the following error.
Please, can anyone help out on this? What is it I haven't done?
$ ./bin/dev
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/process.rb:54:in `spawn': Exec format error -
bin/rails server -p 3000 (Errno::ENOEXEC)
./bin/dev
Installing foreman...
Fetching foreman-0.87.2.gem
Successfully installed foreman-0.87.2
Parsing documentation for foreman-0.87.2
Installing ri documentation for foreman-0.87.2
Done installing documentation for foreman after 3 seconds
1 gem installed
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/process.rb:54:in `spawn': Exec format error - bin/rails server -p 3000 (Errno::ENOEXEC)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/process.rb:54:in `block in run'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/process.rb:53:in `chdir'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/process.rb:53:in `run'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:367:in `block (2 levels) in spawn_processes'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:364:in `upto'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:364:in `block in spawn_processes'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:363:in `each'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:363:in `spawn_processes'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:57:in `start'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/cli.rb:42:in `start'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/command.rb:27:in `run'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor.rb:369:in `dispatch'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/base.rb:444:in `start'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/bin/foreman:7:in `<top (required)>'
from C:/Ruby31-x64/bin/foreman:32:in `load'
from C:/Ruby31-x64/bin/foreman:32:in `<main>'
Profile.dev
Procfile.dev
For me removing the 'bin/' from Procfile part worked
It looked like this
web: rails server -p 3000
js: yarn build watch
Just the same as i'd run standard rails server

How do I resolve Composer dependency upgrading to CakePHP4?

I'm following the upgrade instructions for moving a CakePHP project to version 4. All went well until the final command:
php composer.phar require --update-with-dependencies "cakephp/cakephp:4.0.*"
This resulted in
Problem 1
cakephp/bake 1.11.2 requires cakephp/cakephp ^3.8.0 -> satisfiable by cakephp/cakephp[3.8.0, >>3.8.0-RC1, 3.8.0-RC2, 3.8.0-RC3, 3.8.0-beta1, 3.8.1, 3.8.10, 3.8.11, 3.8.2, 3.8.3, 3.8.4, >>3.8.5, 3.8.6, 3.8.7, 3.8.8, 3.8.9, 3.x-dev] but these conflict with your requirements or >.minimum-stability.
cakephp/bake 1.11.2 requires cakephp/cakephp ^3.8.0 -> satisfiable by cakephp/cakephp[3.8.0, 3.8.0-RC1, 3.8.0-RC2, 3.8.0-RC3, 3.8.0-beta1, 3.8.1, 3.8.10, 3.8.11, 3.8.2, 3.8.3, 3.8.4, 3.8.5, 3.8.6, 3.8.7, 3.8.8, 3.8.9, 3.x-dev] but these conflict with your requirements or minimum-stability.
cakephp/bake 1.11.2 requires cakephp/cakephp ^3.8.0 -> satisfiable by cakephp/cakephp[3.8.0, 3.8.0-RC1, 3.8.0-RC2, 3.8.0-RC3, 3.8.0-beta1, 3.8.1, 3.8.10, 3.8.11, 3.8.2, 3.8.3, 3.8.4, 3.8.5, 3.8.6, 3.8.7, 3.8.8, 3.8.9, 3.x-dev] but these conflict with your requirements or minimum-stability.
Installation request for cakephp/bake (locked at 1.11.2, required as ^1.9.0) -> satisfiable by cakephp/bake[1.11.2].
The VERSION.txt for the project shows CakePHP at 3.8.11.
In the composer.json file:
"require-dev": {
"cakephp/bake": "^1.9.0",
"cakephp/cakephp-codesniffer": "^3.0",
"cakephp/debug_kit": "^3.17.0",
"josegonzalez/dotenv": "3.*",
"psy/psysh": "#stable"
},
Without updating, change all requirements according to the latest 4.x application template's composer.json file, change the requirements for other CakePHP plugins that you might have installed to a 4.x compatible version too, and then update your dependencies.
composer require --no-update "cakephp/cakephp:^4.0" "cakephp/migrations:^3.0#beta"
composer require --no-update --dev "cakephp/bake:^2.0.3" "cakephp/cakephp-codesniffer:~4.1.0" "cakephp/debug_kit:^4.0" "phpunit/phpunit:^8.5"
composer update --with-dependencies

heroku error Couldn't create 'limoexotic_production' database. Please check your configuration

I have simple website hosted in heroku app I find many solution here but nothing solved my problem! It run locally fine but in heroku when I run heroku run rake db:migrate I got this error
heroku run rake db:create db:migrate
Running rake db:create db:migrate on ⬢ limoexotic... up, run.9833 (Free)
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Couldn't create 'limoexotic_production' database. Please check your configuration.
rake aborted!
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
/app/vendor/bundle/ruby/2.4.0/gems/pg-0.18.4/lib/pg.rb:45:in `initialize'
/app/vendor/bundle/ruby/2.4.0/gems/pg-0.18.4/lib/pg.rb:45:in `new'
/app/vendor/bundle/ruby/2.4.0/gems/pg-0.18.4/lib/pg.rb:45:in `connect'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/postgresql_adapter.rb:692:in `connect'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/postgresql_adapter.rb:223:in `initialize'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in `new'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in `postgresql_connection'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:830:in `new_connection'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:874:in `checkout_new_connection'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:853:in `try_to_checkout_new_connection'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:814:in `acquire_connection'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:538:in `checkout'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in `connection'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:1033:in `retrieve_connection'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/connection_handling.rb:118:in `retrieve_connection'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/connection_handling.rb:90:in `connection'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/tasks/postgresql_database_tasks.rb:12:in `connection'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/tasks/postgresql_database_tasks.rb:21:in `create'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/tasks/database_tasks.rb:119:in `create'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/tasks/database_tasks.rb:139:in `block in create_current'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/tasks/database_tasks.rb:316:in `block in each_current_configuration'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/tasks/database_tasks.rb:313:in `each'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/tasks/database_tasks.rb:313:in `each_current_configuration'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/tasks/database_tasks.rb:138:in `create_current'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.4.2/lib/active_record/railties/databases.rake:29:in `block (2 levels) in <main>'
/app/vendor/bundle/ruby/2.4.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:74:in `load'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:28:in `run'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-2.0.2/lib/bundler/cli.rb:465:in `exec'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-2.0.2/lib/bundler/cli.rb:27:in `dispatch'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-2.0.2/lib/bundler/cli.rb:18:in `start'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-2.0.2/exe/bundle:30:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-2.0.2/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/app/vendor/bundle/ruby/2.4.0/gems/bundler-2.0.2/exe/bundle:22:in `<top (required)>'
/app/bin/bundle:3:in `load'
/app/bin/bundle:3:in `<main>'
Tasks: TOP => db:create
(See full trace by running task with --trace)
in my database.yml file
default: &default
adapter: postgresql
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000
development:
<<: *default
database: limoexotic_development
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: limoexotic_test
production:
<<: *default
database: limoexotic_production
The reason I cannot update DATABASE_URL is because it's currently pointing at another database without any auxiliary attachments . I solved my error by going to heroku.com url to my app then setting then Config Vars The DATABASE_URL was different than the ORIGINAL_DB_URL so I changed the DATABASE_URL to be similar to ORIGINAL_DB_URL In my case: postgres://quxhxkeml.............

Problems with Redmine 2.2.1 on Ubuntu 10.04 ruby(1.8.24) on rails(3.2.11) couldn't be started

Hi I face the following problem upgrading to Redmine 2.2.1 from 1.2.2 on Ubuntu 10.04LTS:
Initial hiccups i could resolve but now opening the redmine webpage i get an error.
I followed the step in http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade
and upgraded the required stuffs.
Do i have some compatibility issue with rails and passenger or some configuration is apache?
I am unable to figure. Kindly help me in figuring out the issue.
Thanks in advance,
Ghosh.
Webpage error:
A source file that the application requires, is missing.
It is possible that you didn't upload your application files correctly. Please check whether all your application files are uploaded.
A required library may not installed. Please install all libraries that this application requires.
Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.
Error message:
no such file to load -- dispatcher
Exception class:
LoadError
Application root:
/usr/share/redmine
Backtrace:
# File Line Location
0 /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb 251 in `require'
1 /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb 251 in `require'
2 /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb 236 in `load_dependency'
3 /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb 251 in `require'
4 /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb 308 in `preload_application'
5 /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb 248 in `initialize_server'
6 /usr/lib/ruby/1.8/phusion_passenger/utils.rb 255 in `report_app_init_status'
7 /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb 233 in `initialize_server'
8 /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb 194 in `start_synchronously'
9 /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb 163 in `start'
10 /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb 209 in `start'
11 /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 262 in `spawn_rails_application'
12 /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb 126 in `lookup_or_add'
13 /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 256 in `spawn_rails_application'
14 /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb 80 in `synchronize'
15 /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb 79 in `synchronize'
16 /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 255 in `spawn_rails_application'
17 /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 154 in `spawn_application'
18 /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb 287 in `handle_spawn_application'
19 /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb 352 in `__send__'
20 /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb 352 in `main_loop'
21 /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb 196 in `start_synchronously'
22 /usr/lib/phusion_passenger/passenger-spawn-server 61
My Redmine related stuffs are configured as below:
Environment:
Redmine version 2.2.1.stable
Ruby version 1.8.7 (x86_64-linux)
Rails version 3.2.11
Environment production
Database adapter MySQL
Redmine plugins:
no plugin installed
Gems included by the bundle:
* actionmailer (3.2.11)
* actionpack (3.2.11)
* activemodel (3.2.11)
* activerecord (3.2.11)
* activeresource (3.2.11)
* activesupport (3.2.11)
* arel (3.0.2)
* builder (3.0.0)
* bundler (1.2.3)
* coderay (1.0.8)
* erubis (2.7.0)
* fastercsv (1.5.5)
* hike (1.2.1)
* i18n (0.6.1)
* journey (1.0.4)
* jquery-rails (2.0.3)
* json (1.7.6)
* mail (2.4.4)
* mime-types (1.19)
* multi_json (1.5.0)
* mysql (2.8.1)
* net-ldap (0.3.1)
* polyglot (0.3.3)
* rack (1.4.4)
* rack-cache (1.2)
* rack-openid (1.3.1)
* rack-ssl (1.3.2)
* rack-test (0.6.2)
* rails (3.2.11)
* railties (3.2.11)
* rake (10.0.3)
* rdoc (3.12)
* ruby-openid (2.1.8)
* sprockets (2.2.2)
* thor (0.16.0)
* tilt (1.3.3)
* treetop (1.4.12)
* tzinfo (0.3.35)
root#ubuntu:/usr/share/redmine# gem list
*** LOCAL GEMS ***
actionmailer (3.2.11, 2.3.11)
actionpack (3.2.11, 2.3.11)
activemodel (3.2.11)
activerecord (3.2.11, 2.3.11)
activerecord-mysql2-adapter (0.0.3)
activeresource (3.2.11, 2.3.11)
activesupport (3.2.11, 2.3.11)
arel (3.0.2)
builder (3.0.0)
bundler (1.2.3)
coderay (1.0.8)
daemon_controller (1.1.0)
erubis (2.7.0)
fastercsv (1.5.5)
fastthread (1.0.7)
hike (1.2.1)
i18n (0.6.1, 0.4.2)
journey (1.0.4)
jquery-rails (2.0.3)
json (1.7.6)
mail (2.4.4)
metaclass (0.0.1)
mime-types (1.19)
mocha (0.12.3)
multi_json (1.5.0)
mysql (2.8.1)
mysql2 (0.3.11)
net-ldap (0.3.1)
passenger (3.0.19)
pg (0.14.1)
polyglot (0.3.3)
rack (1.4.4, 1.1.5)
rack-cache (1.2)
rack-openid (1.3.1)
rack-ssl (1.3.2)
rack-test (0.6.2)
rails (3.2.11)
railties (3.2.11)
rake (10.0.3)
rdoc (3.12)
ruby-openid (2.1.8)
rubygems-update (1.8.24)
sprockets (2.2.2)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.12)
tzinfo (0.3.35)
This was resolved in another forum, and I'd like to post the resolution here in case anyone else needs it...
I updated passenger:
gem update passenger
Then:
passenger-install-apache2-module
Then modify apache2.conf file to use the new passenger version. The above installer tells you what needs to be modified in your environment.
Then restart apache and voila!
Hope this helps.

Problem in migrating a database to Heroku

When trying to migrate a database to Heroku, I get the following (Provided that I'm using gem 'sqlite3', '1.3.3':
$ heroku rake db:migrate
(in /app)
rake aborted!
uninitialized constant Rake::DSL
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:8:in `<class:Ta
skLib>'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:6:in `<module:R
ake>'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:3:in `<top (req
uired)>'
/app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.9.1/lib/rdoc/task.rb:37:in `require'
/app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.9.1/lib/rdoc/task.rb:37:in `<top (requi
red)>'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentation.r
ake:2:in `require'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentation.r
ake:2:in `<top (required)>'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in `load'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in `block
in <top (required)>'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in `each'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in `<top (
required)>'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:215:in
`require'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:215:in
`initialize_tasks'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:139:in
`load_tasks'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:77:in
`method_missing'
/app/Rakefile:7:in `<top (required)>'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `load'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/ruby1.9.2/bin/rake:31:in `<main>'
How can I solve this issue?
Thanks.
Rake aborted! Uninitialized constant Rake::DSL on Heroku
I have a blog post about this here. There are two ways to do this:
Only use the older version of rake:
Check out your current Rake versions with $ gem list. See which versions of rake you have and remove them all except for0.8.7. You can remove the gems withgem uninstall rake -v=0.9.1 or whatever version you need to remove.
Or just add a one liner to your rake file:
Unless you have to use the older version of Rake it is easier to add this linerequire 'rake/dsl_definition' to your Rails's app Rakefile.
require File.expand_path('../config/application', __FILE__)
require 'rake/dsl_definition'
require 'rake'

Resources