Category: rails

  • My new rails application won’t display the “Yay!” page!

    I was doing some recent environment testing with rails with the same application created on each of OSX, CentOS, and Ubuntu and was surprised when the application gave an error about no root route available, instead of the “Yay!” page: I, [2020-02-12T16:51:06.845723 #46720] INFO — : [8d1ab83a-b4e4-45bf-a734-a6494c4d15c2] Started GET “/” for 127.0.0.1 at 2020-02-12 16:51:06 […]

  • Rails new fails to create all of the content…

    I recently deployed a Rails app on a CentOS 8 container and was surprised to see that the ‘rails new’ command did not create the entire application directory structure that I would expect, ie: [root@607ebc931c48 app]# rails _5.2.3_ new centos_app_2 create create README.md create Rakefile create .ruby-version create config.ru create .gitignore create Gemfile run git […]

  • Why is rails 5.2 joining to the same table twice?

    I was working on a Rails project for a client recently where I was trying to figure out why a model search operation was joining to the same table twice, resulting in a huge performance hit. The answer turned out to be an incomplete understanding of the ‘has_many’ ‘:through’ relationship. Given a model with the […]

  • Rails timestamp search using datetime_field_tag

    I recently worked on an issue when creating a Rails form to search and display objects by timestamp and spent far too much time troubleshooting an issue with the datetime_field_tag form helper. The issue began with the following two lines in my view: Evidently, you cannot place more than one space between the name assigned […]