Rails server always crashing no error - ruby-on-rails

My rails server is always crashing (Ruby console)
I am using windows 7 and I dont get any error in the console. Just an windows error telling my the ruby console how stop working.

Will be great if you add more information about version of Ruby you're using (ruby -v), Version of Rails (saying version 3 is not enough) and any more specific on your settings, like if you're using a MySQL database and how you're connecting to it.
So far, I can point you the the following resources:
Incorrect usage of MySQL library (libmysql.dll) can result in random crashes of Ruby/Rails. See manual installation and compilation steps here
There is a known issue with Ruby 1.9.2 that make it crash on concurrent/multiple threads, reported in Ruby bug tracker #3840. It was not solved in 1.9.2-p290 but is part of Ruby 1.9.3 (due to release in August)
Again, those are the two thing that I can think of based on the scarce information you provided. Please update your question with more details (the development.log file inside log directory should contain something) or even the output that is displayed prior the crash in the console.

I would strongly suggest checking Windows event log and/or ROR logs. Also, what version of ROR are you running?

Related

Errno::ENOENT: No such file or directory - bs_fetch:open_current_file:open - Ruby on Rails Win10

I'm getting an error that prevents me from using rails on Windows 10.
I just created the project using ruby 3.1.2p20 with rails 7.0.3.1. For some reason, I can get the rails version but not run any other commands. I get a massive unreadable stack of libraries failing one after another. The name of the error and error message say nothing useful, as well as the internet.
What can I do? I am trying to work on this project with a colleague that uses a linux-based system.

Postgres issue when upgrading from Rails 4.1.16 to 4.2.0

Rails 4.2 AR apparently is dependent on version 0.15 of pg. When I try to build my app with it I get "Failed to build gem native extension.". Problem lies with "checking for PQconnectionUsedPassword()". In order to get past this point, I upgraded my installation of Postgres, as it did not support that function. SO I installed the multi-version edition of Postgres, migrated my data to a 10.0 server, and then tried again. Same result. How can I fix this?
It seems like the native extension builder of the gem installation process is still seeing info from the old Postgres installation (or at least not seeing info from the new installation). How do I get it to see the new one (before you ask, the new one is running and the old one has been stopped? There is a header file that declares PQconnectionUsedPassword in one of the files within my new Postgres app, but I don't know exactly how that process works, so I don't know how to check if we're using the correct folder.

Rails test unit access denied rename

I'm new here. I search everywhere and I haven't found anything. I'm using rails on windows 10. I'm following the basic tutorial of a sample app. When I execute "rails test" command in the console I get the following errors. I checked the permissions of each file and directory and all have the permissions needed. Can someone help me ?
I'm using rails 6.0.2.2 version.
Hope I'll get answer here.
Solution : I installed ubuntu on windows 10.
Stop your rails server before executing your tests: the server is keeping cache files locked and the testing framework is trying to alter them.
I encountered the same issue (while following what's probably the same tutorial you were following) on Rails 6.0.3.4 on Windows 10 and doing so solved it. (launching the server again before executing tests reproduced it again)
Update: I thought this was a complete solution, but it's more complex than that. Here's my experience:
running rails test while rails server is running results in the error;
running rails test when rails server is not running sometimes results in the error.
I haven't encountered this error on Linux so far, so my guess is that the implementation of Rails of Windows is unstable and sometimes gets stuck locking its own files.
You can check if you can reproduce the same behaviour, but I would report it as a bug.

Why Rails fails with: ruby.exe has encountered a problem and needs to close. We are sorry for the inconvenience

I run a Rails 3 application on Windows XP and it fails sometimes with the following error:
This causes the WEBrick server to shutdown.
When I start the server again, sometimes the page loads as expected and sometimes it fails again with the same error.
I noticed that the error appears when I change one of the JavaScript files that belong to the loaded page.
What could be the reason for this ?
How could I debug this ?
My Ruby version is: ruby 1.9.2p0 (2010-08-18) [i386-mingw32].
You need to check if your 1.9 minor version is stable. There have been some issues with unstable minor 1.9 versions of language before...

Mysterious Mongrel Rails crash

Running Mongrel 1.1.5 on Rails 2.1.2 using PostgreSQL 8.3 via ruby-pg 0.7.9 on OS X 10.4 server...
Added restful_authentication and exception_notification, the latter of which appears to be doing me no good when Mongrel simply dies with "Illegal instruction" every time I select /RESOURCE_NAME/new.
Doesn't matter what resource.
In development.log I see it's declaring its intent to render /layouts/RESOURCE_NAME.html.erb and then ... nothing. No stack trace, no anything. server.log is empty.
This is something of a showstopper and I'm not sure what to do. I tried running webbrick, a la:
script/server webbrick --force
But it ignores my wishes and loads mongrel anyway.
Any pointers would be appreciated.
My guess would be that it's dying when it drops from Ruby down into the Postgress C-library to talk to the database. Possible causes of this might be
You've got the ruby-pg gem for a different OS or version somehow.
Your ruby-pg doesn't match the Postgres libs on your system.
Something else...
Illegal instruction usally happens when you try run a binary from an other OS/ABI/Architecture.
Maybe 32bit vs 64bit? Check your libs!

Resources