This forum is no longer active. Please post your questions to our new community site

problems with initilizing ruby app

Subscribe to problems with initilizing ruby app 5 post(s), 2 voice(s)

 
Avatar scientus 3 post(s)

shawn@ubuntu804desktop:/home/web/rubystack-1.2-beta-0/projects/rubyweb$ script/server
Missing the Rails 2.0.2 gem. Please `gem install -v=2.0.2 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

Clean install of Rubystack on, as u can see ubuntu 804—also added to path in ~/.bash.rc:

export PATH=$PATH:/home/web/rubystack-1.2-beta-0/apache2/bin;
export PATH=$PATH:/home/web/rubystack-1.2-beta-0/common/bin;
export PATH=$PATH:/home/web/rubystack-1.2-beta-0/git/bin;
export PATH=$PATH:/home/web/rubystack-1.2-beta-0/mysql/bin;
export PATH=$PATH:/home/web/rubystack-1.2-beta-0/perl/bin;
export PATH=$PATH:/home/web/rubystack-1.2-beta-0/php/bin;
export PATH=$PATH:/home/web/rubystack-1.2-beta-0/ruby19/bin;
export PATH=$PATH:/home/web/rubystack-1.2-beta-0/perl/bin;

i tried ‘gem install v=2.0.2 rails’ and that didnt help --what exactally do i do?—i know it will probably make me look foolish

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

Have you defined the RAILS_GEM_VERSION variable? Have you tried to define this variable to 2.0.2? What happen if you run the “scripts/server”·action into the rubyconsole?

$ cd /home/web/rubystack-1.2-beta-0/
./rubyconsole.sh

 
Avatar scientus 3 post(s)

yes that worked going into the console--i guess i should allways start it like that—-how will i later set it up as a service?

I didnt try changing the RAILS_GEM_VERSION as it seems important to be able to keep that the same, but there is nothing preventing me.—im pretty new to this stack and wondering how it works if you spin off the Database, etc. Thanks.

Also is this running through apache and mongrels or am i on WEBBrick?

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

There is a “how to install services” article in the BitNami blog at https://bitnami.com/article/how-to-install-services-on-linux . Take a look the rubyconsole code, it is similar that you have been added to .bash.rc. You can add these lines in your bash.rc.

You are running Mongrel by default but you can run also WEBrick. Apache is included to use with phpMyAdmin or as a proxy balancer in production mode.

 
Avatar scientus 3 post(s)

I guess i actually allready did that, but wil only symbolic links and witn K links for runlevel not to run.

but i guess the real problems is that ruby just isnt linked to itsself right and i just get all sort of problems with nothing to show. using ur suggestion i got it running through the ruby console—but when i added stuff i get all this

/!\ FAILSAFE /!\ Tue Jun 24 16:13:03 -0700 2008 Status: 500 Internal Server Error You have a nil object when you didn’t expect it!
The error occurred while evaluating nil.content_type= /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:181:in `rescue_action_locally’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:123:in `rescue_action’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:203:in `perform_action_without_caching’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:678:in `perform_action’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/query_cache.rb:8:in `cache’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:677:in `perform_action’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `send’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `process_without_filters’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in `process_without_session_management_support’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in `process’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in `process’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in `handle_request’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in `dispatch’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in `dispatch’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:76:in `process’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:74:in `synchronize’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:74:in `process’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:159:in `process_client’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:158:in `each’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:158:in `process_client’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `run’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `initialize’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `new’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `run’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:in `initialize’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:in `new’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:in `run’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:282:in `run’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:281:in `each’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:281:in `run’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:128:in `run’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/command.rb:212:in `run’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:281 /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/mongrel.rb:64 /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39 /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’ /home/web/rubystack-1.2-beta-0/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’ script/server:3

i downloaded ur thing cause i though i would have to deal with internal set-up—-but i guess not.