Public Lab Research note

RGSoC proposal: Upgrade to Rails 5

by cess |

Read more:

About me

Name : Ceciliah Wairimu and Stella Ireri

Github : and

Affiliation : Agile Ventures and Tezza Solutions

Location : Nairobi, Kenya

Email :

Project Title : Upgrade to rails 5

Gitter : cess

Twitter: cesswairimu254 and @_stegah

I ( Ceciliah) graduated in December 2017 with a degree in Computer Science . I am currently a mentor and a coach at Rails Girls Nairobi. I am also a member of Agile Ventures, which is a charity dedicated to crowd-sourced learning and software development, where I contribute to open source projects.

Project description

Upgrade to Rails 5 - Upgrade from the current Rails 4.2 to Rails 5.

Abstract/summary (<20 words):

Start upgrading from the models side and running tests to fix any breaks.


1: Upgrade to rails 5 to get the great features of Rails 5 - Rails 5 have a couple of additions dealing with perfomance, security andn new features. New features include action cable and test runner, and remove the deprecated features. Also be at the updated version of Rails. From 5.0 its easier to move to the next versions.


Week 1: Understand the structure of plots2 , update gem dependencies: change rails version in gemfile to read rails 5.0.0., run bundle update:rails and rails app:update

Week 2: Define application classes that are inherited from. These are ApplicationMailer, ApplicationRecord and ApplcationJob. Create these application classes, change mailers, models and jobs to inherit from these respectively.

Week 3: Rails Controller testing: Check changes made in rspec for rails 5, implement and debug

Week 4: Change validations, run tests and fix any breaking tests: Rails 5 has changed the relation to require presence by default for belongs_to. Create an initializer to explicitly configure this behaviour, and where belongs_to is optional, add optional in models.

Week 5: Halt chain callbacks and change any parameters inheriting from hash. In Rails 5.0, returning false in an Active Record or Active Model callback will not have this side effect of halting the callback chain, as in Rails 4.2. Instead, callback chains must be explicitly halted by calling throw(:abort). Add this configuration to do this active record configuration for this and test https requests methods

Week 6: Investigate if all gems work as expected and replace where necessary

Week 7: Testing the whole application and fixing failing tests

Week 8: Fixing failing tests and reviewing the whole process

Week 9: Document the whole process, gems substitutions made, any models changed, e.t.c

Week 10: Implement PR review requests.


I will need the upgrade documentation which is available from the rails guides site.

A while back I used this blog when I was helping a friend upgrade and it really helped.

I will be working on this with my teammate(Stella Ireri) .

Equivalent gems to the existing ones which I can get from the ruby gems sites.

I will need to know the basic project structure so as to be able to fix specs which may fail.

First-time contribution

I made a little contribution last month and I am familiar with the contribution guidelines.Here is the PR. I am also in the project's gitter for communication.


I undertook an undergraduate program in computer science at the university. I chose to do the course because i liked computers and what they can do. In diving deeper to the world of computers, i came to love software development. During my third year break i attended a boot camp where i was first introduced to Ruby, Rails, Version control with git, open source and issue tracking. After the boot camp I joined a community, Agile Ventures, where i learned about sprints, scrums and code enhancement tools like Rubocop and code climate. I contribute to open source projects every now and then. I am one of the leads of Rails Girls Nairobi , where we meet weekly and introduce other ladies to code using Ruby on Rails and how to get involved in open source projects.

Code links:


Code9ty bootcamp team: We were a team of 7 in the cohort where we collaborated in making applications such as the code9ty website mention above, personal projects during the learning process, and pair programming.

Rails Girls Nairobi : In this community I am a coach and I have two students that I coach who are getting started on Ruby on Rails

Technovation: I was a coach and had a team of 5 high school girls who I coached make an android application using MIT app Inventor , to solve a problem facing there community.


The plots2 project: The idea of open sourcing research data is what interests me most about Public Lab.


This project will be a resource to the whole Public Lab community with the increase in performance, security and addition of new features.

For collaborators it will make it easy to move to the next versions in future.


I will dedicate 8 hours per day to work on this project and work to meet my milestones. I am self-motivated and will involve my teammate in the process of working throughout the project. I will ask for assistance from my coaches if i get a challenge and if they have no solution I will consult the mentor.

software gsoc soc gsoc-2018 soc-2018 rgsoc-2018 soc-2018-proposals



Hi! Do you think you could flesh out (in smaller pieces) exactly what you'd be working on in a checklist of sorts? You could copy in stuff from the relevant Github issues, and link to them -- that'd be really helpful!


And this example of upgrading to Rails 4.1:

See how the existing 4.2 one has a kind of checklist of things that have to be completed to merge the changes?

Thanks a lot!!!

I also wanted to suggest that this is a big synchronous project where many changes would happen in a single PR, so not as modular as other possible projects. If you wanted to explore other options, there are some promising issues or ideas in!

Is this a question? Click here to post it to the Questions page.

Thanks @warren will take a look and update the proposal

@cess Any updates.? Thanks

Is this a question? Click here to post it to the Questions page.

@mkashyap354 and @warren I updated the milestones part. Sorry I forgot to say I did. As for the issue to link I did not find an issue of the same on github. Thanks

Great -- thank you!!! I think you're right there is not a Rails 5 issue. Perhaps we're waiting until the Rails 4.2 one is complete! I do like how thoroughly you've plotted out the needed changes. Are you comfortable rebasing code often? Because in a project this big, you'll unfortunately have to do so pretty regularly as other people submit code before you've completed the changes -- it's a tough one!

A good read over this may help --

and our testing will help a lot. But this is one reason we're trying to do as much as we can ahead of time before committing to the Rails 5 change so that the moment of change-over is as short as possible, you know?

Thank you!!!

Is this a question? Click here to post it to the Questions page.

@warren Yes I am familiar and comfortable with rebasing code often and thanks for the information.

You must be logged in to comment.