Notch8 Ruby on Rails Web Application Developers

Full-throttle Ruby on Rails Development

  • About
    • Team
    • Active Clients
  • Work
    • Capabilities
    • Framework Updates
    • HykuUP
    • Code Audits and Reviews
    • Ongoing Application Maintenance and Support
  • Clients
    • Case Study: Vizer
    • Case Study: Atla Digital Libary
    • Case Study: ShopTab
    • Case Study: UCSD
    • Case Study: WUSTL
    • Case Study: UCLA
  • Samvera
  • Blog
  • Contact
You are here: Home / Archives for Blog / Coding Corner

Coding Corner

The only thing we love more than code is sharing our knowledge. Look here for insights on everything software development.

Upgrading Your App to Rails 6

April 7, 2020 by Kevin Kochanski Leave a Comment

You may know Ruby on Rails 6 was released recently, but what does that mean for your Rails app?  Is it time for an upgrade?

Rails 6 was released in August 2019 and brings a lot of upgrades out of the box that offer improved performance, security, and additional feature options.

  • Parallel testing support reduces the time of running an entire test suite
  • Action Text utilizes Trix editor to bring WYSIWYG rich text content and editing to Rail
  • Support of multiple databases out of the box
  • Action Mailbox handles inbound email routing
  • Zeitwerk code loader 
  • In security, Host Authorization guards against DNS attacks by allowing only permitted hosts to access your application  

While Rails 6 allows your application to take advantage of these new features, it’s also important to understand when an upgrade is essential to ensure performance and uptime of your app.  Rails 4 or earlier is no longer supported, no longer receiving vital security patches.  Rails 5.0 is still receiving critical patches for now, but will be the next version to age out of support.  Releases Rails 5.2 and higher are still receiving regular security updates.

When undertaking any Rails upgrade, you’ll start by determining your current version of Ruby and Ruby on Rails – Rails 6 requires Ruby 2.5 or later (current stable is 2.7.1).  You’ll need to collect data about application code, test suite, gems, and dependencies. Planning an upgrade without interrupting performance of an app that’s currently in production is delicate, especially if app development will continue in parallel with an upgrade. 

Notch8 has built a business on Rails expertise for thirteen years, and we know even planning the roadmap to an upgrade is daunting. We offer Rails upgrade audits for $600, which provides an upgrade plan and highlights vulnerabilities. Our audit examines your code and dependent services, following a thorough process that:

  • Identifies any performance and scalability problems (load, memory leaks)
  • Identifies potential security risks
  • Evaluates database schema identifying any problems or deviations from the Rails conventions
  • Identifies problems migrating from earlier frameworks
  • Evaluates test coverage
  • Inspects dependent services, including databases and search services, and offers advice on upgrading those as needed
  • Provides feedback on coding style as it relates to “Rails Way” best practices
  • Checks the Github page for all gems to find out their compatibility with Rails 6.0

When the time comes, we’re also able to provide assistance in upgrading your app. If you decide to move forward with the upgrade, we will discount the price of the audit from the upgrade itself. Notch8 uses Docker to manage dependencies, and can also offer assistance in Dockerizing your application. Have questions or want to get started? We’ll be happy to set up a call!

Filed Under: Blog, Business Buzz, Coding Corner Tagged With: Rails, Ruby

Blending React into a Rails Project

November 7, 2016 by Steven Leave a Comment


With the release of Rails 5.1 and the integration of webpack and yaml into rails all that is described here can be done much more simply using what is integrated into rail. That said, if you can’t upgrade yet or require serverside render the solutions below are still great options for you.


While the dawn of the large JS frontend app is long past and there is a new magical unicorn and pixi dust JS framework every time you turn around, there are still a lot of stock standard web apps out there. As a web consultancy, these apps have been our bread and butter for quite some time and there is no real need to change them. They just work.

But as things change, it would be nice to add some of the dynamic features of the new javascript hottness to our standard rails apps. Here are a few ways to integrate React into rails.

Notice: there is going to be a stupid amount of alliteration in this post. Fair warning. React rendering in Rails rendered radical web app.

React-Rails gem

I am starting here because this is the easiest way to get started with React on Rails. Per usual, just include the gem in your gem file gem react-rails, bundle install, and then run the install generator rails g react:install.

The reason I say this is it is fully integrated with sprockets and the current rails asset pipeline. if you already understand the asset pipeline and helper methods, then you’re good to go. Also, there is no dependacy on npm.

This is all you need to mount a React component to a spot on the page. That is this helper react_component.

<%= react_component("MyCoolWidget", prop1: "123", prop2: "abcd") %>

Other features include the ablitiy to render the components on the server for faster rendering and SEO, rendering a component as a view, and writing your components in ES2015 syntax or CoffeeScript.

One problem to note is that this doesn’t support a module system for JavaScript like Common-JS or ES6 imports. So, working with packages for React that do not have a version that does not export a useable variable is difficult.

[Read more…]

Filed Under: Coding Corner Tagged With: JavaScript, Rails, React

React Testing

October 3, 2016 by Steven Leave a Comment

React Testing

Lets face it, testing is important but testing javascript UIs is not often straightforward.

Now for React. React is a excellent choice for your front-end view logic. I love React for how productive it makes me feel. However, one downside of the React ecosystem is that there are so many choices to make in terms of what tools you will use. Varying choices include Webpack, Browserify, ES6 and Babel to manage your state, business logic and request data. It requires a lot of sifting through. To make it easy, here is a set of good choices for testing React that have worked well for us.

Tools

  • Mocha & Chia

Mocha is a test runner that has been around for a good while. It provides describe() and it() functions for BDD style testing. It is reminiscent of Rspec in the Ruby world. Chia is often used with Mocha as it brings a whole host of assertions for whichever style of testing you like.

  • Chia

With Chia you have the options of using expect, should, and assert style assertions making it flexible for anyone’s taste.

  • Enzyme

Enzyme is a React component testing library from airbnb. It provides multiple, optimized ways to render React components and make assertions against them. Enzyme uses JSdom for some of its functionality and will be included as a dependency.

[Read more…]

Filed Under: Coding Corner Tagged With: JavaScript, React, Testing

Implementing a Bootstrap Theme

June 29, 2016 by Crystal Richardson 2 Comments

After completing the development bootcamp, LEARN! in San Diego, and joining Notch8 as Interns, my team members and myself were tasked with creating a web app using a bootstrap template. We had worked on front end and had previously created web apps from the ground up in our group projects but we spent a full day browsing blogs and guides on how to best implement a template. Unfortunately, the guides we had found were not as straightforward as we would have liked. None offered a simple set of instructions of what to do and the rational behind it. So we created our own guide.
The most important aspect of web development to understand when using a bootstrap template is the asset pipeline. It is highly recommended that you familiarize yourself with this framework before attempting to use a template.
In simple terms, using a template requires that you copy all the images, scripts and css into the asset pipeline. Once this is done, you are free to use whatever you want from the html part of the template and take out what you don’t need. The following is a step by step guide on how to achieve this.

[Read more…]

Filed Under: Coding Corner Tagged With: Bootstrap, Rails

Phrack Magazine Article in Hacking Rails

May 16, 2016 by Matt Clark Leave a Comment

Older Rails applications are more vulnerable to hacking now

Phrack magazine, a prominent hacking zine, just published a new issue. For the first time, it includes an article on Rails vulnerabilities and how to exploit them. If your app is current, there’s nothing to worry about, but older apps should definitely be aware of all these items:

http://phrack.org/issues/69/12.html#article

It’s also good to see the kinds of attack vectors people are exploiting so that we keep a sharp eye out for new issues as they arise.

Filed Under: Coding Corner Tagged With: Rails, Security

  • 1
  • 2
  • 3
  • Next Page »

Capabilities & Services

Notch8 has an experienced team of web developers distributed on the west coast of the U.S. available for:

  • Design, Planning, and Architecting
  • iOS and Android Development with React Native
  • Code Audits and Reviews
  • Ruby on Rails and Javascript Development
  • Full Stack Development
  • Samvera / Hyku Data Preservation Solutions
  • Framework Upgrades
  • Monitoring and Support
  • Deployment Optimization and Containerization
  • Team
  • Contact Us
  • © Notch8 2017, some rights reserved

Copyright © 2021 · Parallax Pro Theme on Genesis Framework · WordPress · Log in