0

Rails server keeps crashing after a few seconds of starting it.

rails version 2.3.8 ruby version 1.8.7

I'm using windows and Apatana Studio.

There is no error in stacktrace too. Could you please help me to identify what is causing this issue or suggest me where can I check the same? (eg. any specific logs etc.)

Stacktrace : => Booting Mongrel config.load_paths is deprecated and removed in Rails 3, please use autoload_paths instead config.load_paths= is deprecated and removed in Rails 3, please use autoload_paths= instead => Rails 2.3.9 application starting on /servers/trunk/main/app/models/market.rb:32: warning: already initialized constant MARKET_CODE_US

Akshay M
  • 39
  • 1
  • 8

3 Answers3

2

I solved this by unstalling SQLite and reinstalling from the command line.

gem uninstall sqlite3
gem install sqlite3

Found the solution here: Rails segmentation fault when starting server?

Community
  • 1
  • 1
0

Error says that you already initialized MARKET_CODE_US in your code. And trying to initialize again in your market model. Find MARKET_CODE_US in your application direction and remove any unnecessary initialization.

Dipak Gupta
  • 7,321
  • 1
  • 20
  • 32
  • thanks Nitin, but even when i comment out the declaration line for that- server would still crash. May i know where are logs of such events stored? (Please note that - I'm just importing code into workspace and setting up dev environment - so high chances are that there is some issue in installation) – Akshay M Oct 29 '14 at 06:35
  • Issue was with installation of sybase adapter. got it sorted out. – Akshay M Dec 09 '14 at 05:11
  • That's great. Please post an answer to your question. If anyone have this issue then they will get answer. – Dipak Gupta Dec 09 '14 at 06:36
0

In my case, I was not able to connect to Sybase DB from my application. There were issues with the underlying drivers and I hadn't tested connectivity to DB separately (not using my rails app) using those. But there was a .rb script in the driver folders for testing connection to Sybase from a standalone Ruby code. I used that to diagnose issues. So whenever you are setting up dev env from existing code, just test connectivity to required DB using those drivers separately before plugging them together and then testing.

Akshay M
  • 39
  • 1
  • 8