Tuesday, 23 July 2019

Is Rails broken?

I am increasing worried that Ruby on Rails is not a stable environment. I was trying to update my project, and hit error after error in the infrastructure.

Warbler does not work with JRuby 9.2.7

See here:
https://github.com/jruby/warbler/issues/451

Using an earlier version resolves it. Is this a Warbler issue or JRuby? Who knows, but it starts to shake my confidence.

It would help if Warbler gave some clue it was doing something. It takes around 30 minutes for me, during which it reports that is is deleting the old version, and later that it is creating the new one. Most of that time.... Nothing. Has it crashed? Who knows.

Cannot create new projects with Rails: 5.2.3

I was trying to do this to investigate other issue, and found I could not even create a new project! This is basic!

I started a thread on Stack Overflow, without much response.
https://stackoverflow.com/questions/56787268/jruby-and-bindex-error-failed-to-build-gem-native-extension?noredirect=1

I tried three different versions of Java, two versions of Windows, two versions of JRuby:

Java: Zulu 11 (64 bit), Zulu 8 (32 bit), 1.8.0 (Win7)
JRuby: 9.2.7, 9.1.17

Turns out I can use Rails 5.2.2. It produces a Rails 5.2.3 project, but does work. But seriously, why would I choose to use something that is obviously broken?

Rake version mismatching

How often do I see this error?

Gem::LoadError: You have already activated rake 12.3.0, but your Gemfile requires rake 12.3.2

I have no reference to Rake in Gemfile, and I can delete Gemfile.lock, but still there is a mismatch between versions when I do bundle. This is exactly what Bundler should be preventing. The solution is to uninstall rake, then install the version the Gemfile requires, 12.3.2 in this case. Why does Bundler not do that?!?

Tomcat will not run my project.

I just see this error on the screen (and no errors in any of the log!):

Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered

This is with both JRuby: 9.2.7 and 9.1.17, and Rails 5.2.3. I tried Bundler 2.0.2, 2.0.1 and 1.16.6, as I suspected it was the culprit, but none worked.

Google cannot find ANY pages with that exact error... It could be because I have Rails 5.2.2 installed, but much of the other rails gems are 5.2.3


My production server is running Tomcat 9.0.14, and 32 bit Java jre 1.8.0 191, so I started from scratch, with Tomcat and Java as per the server, and the last .war that works on the sever, and got that working on my PC.

Then I copied gemfile and gemfil.lock from the working version to the new, and ran bundler successfully, but warbler then said:

Gem::LoadError: You have already activated rake 12.3.0, but your Gemfile requires rake 12.3.2.

Why had that reverted to 12.3.0? Who knows. I had been messing around with Rails versions, so could have done it by accident.



I still do not know the underlying reason for the error, but at least it is running now.

Is Ruby on Rails Broken?

I have to wonder. It feels less stable at version 5 than it did at version 2 or 3 when I adopted it 10 years ago. I would have hoped it was getting more stable as it gets more mature, not less.

I want a framework I have confidence in, and Rails is not that any more.

No comments: