Strange issue with ruby lirbary for Kaltura - ruby-on-rails

I'm trying to integrate Kaltura video's in my Rails project, for which I use the ruby library from Kaltura. I'm running into the problem that my code works fine on console and the exact same code running under rails server causes a nasty crash (or freeze actually, no debug, I have to kill the process manually to be able to restart).
So my questions:
could there be a difference in libraries that both instances are
running? I'm pretty new to the gem stuff, so I don't know if this
could even be possible.
Is there a way to verify (by using a command or such) to check that
both are accessing the same library?
What could be causing such nasty freezes on server without also causing that on the console
Any help is much appreciated!

Related

Generator freezing and needs to be interuppted

I am trying to use this gem
https://github.com/AndyObtiva/ultra_light_wizard
When I run...
rails generate ultra_light_wizard:scaffold Project steps:basic_info,project_detail,file_uploads,preview attributes:name:string,description:text,start_date:date,delivery_date:date
The system freezes and I have to interrupt the process to do anything else. What is the best way to trouble shoot the issue? How can I run the command and get feedback on what the code is doing?

how to debug web server on RoR?

I currently have a problem with a project.
it freezes before it shows the "Started GET ...." seems like it hits an infinite loop.
now i dont really have much experience with debuggers in ROR, can anyone recommend anything i can use to trace the exact origin of the problem. if i can get an error code somewhere then i might be able to fix it.
currently i am using webrick, i tried thin and it gave the exact same error.but i am willing to use anything to find the exact origin of this error.
it seems to be related to the project because all other projects works fine on my environment.
Take a look at the Rails guide on debugging.
Also try running the Rails console ("rails c"); if you can get to a command prompt at all that means that the issue is not in loading the Rails environment (e.g. a problem in application.rb) but is somewhere in the process of making a web request. If there's a failure it may give you a better error message.

Rails server running in command prompt causing conhost.exe to crash

I have a Rails application that requires a bunch of environment stuff to get set up, and right now the easiest way for me to do it is to run a batch file to configure the environment and then launch the server from the command prompt. (Perhaps one day I will bite the bullet and transcribe all of the various environment variables into the project config, but I'd rather not...)
But when I do this, I occasionally manage to crash conhost.exe! It does not seem like I should be able to do this. Stranger still, it seems to happen most often if I access certain records in the application. I can't imagine it could crash if there were too much console output???
I am also having mscvrt-ruby.dll crashes, although I may have resolved those by doing some gem finagling. The conhost issue may or may not be related, I'm not sure. But if I launch the server from within RadRails, I don't seem to get these issues (the app doesn't completely work because of the missing environment stuff, but it seems much more stable).
Technicals: Windows 7, Rails 2.3.5, Ruby 1.93, Mongrel 1.2.0pre, uh, not sure what else...
Thoughts?

ruby on rails unable to find interface that appears to be proplery defined

I'm brand new to ruby on rails and trying to run an application developed by others. I downloaded it from SVN it running yesterday, but today when I try to run it the first attempt to access the site's home page I get the message:
expected .../app/helpers/interface/table_helper.rb to define Interface::tableHelper.
.../lib/active_support/dependencies.rb:452:in 'load_missing_constant'
This file exists, and properly defines the tableHelper interface. Since I was able to run the program when I was setting it up yesterday, and others can run it without issue, I assume the problem I'm seeing is caused by an incorrectly set up environment rather then bad code somehow.
Can anyone suggest what I might try to figure out why rails can't seem to detect a properly defined interface?
If you were able to run the program once, perhaps something got screwed up? Have you made any changes to the code?
Alternatively, try stopping and restarting the server.
Also: what's the application? Maybe we can look at the codebase...

Rails 5.1.7 Server Hangs On First Request

We are trying to update a Rails Server to release 5.1.
Server starts fine; but on the first request, goes completely dead; and has to be killed with signal 9.
Doesn't matter if its Puma or Webrick.
Doesn't matter if its 5.1.0 or 5.1.7
Doesn't matter if its development or production mode.
Eventually I saw the process size was 90GB and growing!
I've tried rbtrace, but struggled to get anything meaningful out of it.
I'm on osx, so strace isn't available, and I've struggled to get dtrace or dtruss to work, or produce anything meaningful.
So looking for a way to get this rails server to tell me what it's problem is....
Let me know what additional information is salient.
After quite a long process, I found a solution that didn't so much find the source of the issue, but provided a process to work around it.
First off, I used
rails app:update
And accepted all of the overwrites. Then using git, I walked through all of the removed code from my config file and returned just the required sections [like config/routes.rb, and ActionMailer config, for example].
Application then started right up, no issue.
This also led me to
http://railsdiff.org/5.0.7.2/5.1.0
Which is pretty critical for Rails upgrading. This is well worth consuming:
https://github.com/rails/rails/issues/31377#issuecomment-350422347

Resources