lntro: Currently, I am searching for a job as a ruby on rails developer, I had many interviews and still going on hunting. I hope when you will be on the same track, these question will definitely help you to prepare for rails interview. If you find some new question please comment here. For now I am adding just a list of questions but next, I will add solutions and links too.
Mostly Interviewer asks whatever you have mentioned in your resume/cv:
- about your project
- about your role in that project
- gems which you used in the project
Apart from your project's challenges, gems they asked the following questions.
- Diff btw delete_all and destroy_all, delete and destroy
- Dirty methods
- How to delete local git branch
- Diff Module vs Class
- Mixin
- Working of CSRF token
- Where CSRF token is stored.
- How to add ssh key
- Web server vs app server
- Deployment tools
- Tools vs plugin vs gems
- How to create a gem
- What is a gem
- How to run an application without DB.
- What was the most difficult task which you faced and how to manage?
- Git fancy
- Which frameworks are using ruby besides rails?
- Why we say ‘Ruby on Rails’ not ‘Rails on the ruby.
- Filter,callbacks,hooks,scopes,proc,lambda
- How to do metaprogramming in ruby.
- Jobs
- Rake tasks
- Benchmarking
- How to improve the performance of your website.
- What will be cases of taking time to load a website.
- Sorting programs from scratch.
- Have you worked open-sourced?
- Have you created a gem?
- List out gems which you used ever and why
- How a refund service works in Braintree.
- About action cable, live chat
- Git rebase vs Git merge
- Active records, action dispatch
- What is Serialization, why we prefer, how to use it?
- Which gem you use for the management of roles of the user.
- Have you use angular or ember ever , how.
- How to do if you have some uncommitted code and need to take pull from the latest branch.
- How to push code when you reset the last commit in your local branch.
- What is git, commit, head, stash.
- How stash works.
- Which is the latest version of rails and ruby (stable and latest release)?
- Have you worked with Nginx?
- Have you used CSS/HTML, the latest version of HTML, CSS and why you used that version
- How much you are rating yourself on rails/ruby/javascript/jquery/UI
- Tell me 10 functions of jquery which you used in the project.
- Jquery vs javascript
- What are callbacks in JavaScript?
- Have you used the application only API?
- What is nil
- Nil vs FALSE
- How to make a hash so that it returns the same result like hash[:name] and hash["name"] has an equal result.
- map /each/collect
- When ‘includes’ gives poor performance.
- Scope vs class methods.
- ORM
- What can be security leaks in your rails application?
- Versioning in API why should we use.
- What is caching(type), have you used.
- Routes (types, when and which preferable, versioning, put/patch, match, module, a single route for a resource, resources/resource.)
- When we should use join instead of includes.
- Association: all types / how to use polymorphic.
- How to use ransack for searching across multiple models like search by book, search by post.
- Social authentication.
- Authentication vs authorization.
- Which API of google have you used?
- Have you used country_select gem, how to do it from scratch?
- What is counter cache
- Concept Of STI (Single Table Inheritance)
- The sequence of the files executed when starts rails server.
- Why doctype is used in HTML?
- Difference between on and live (jQUERY)?
- Polymorphic association and its use?
- What is fingerprint in rails application(assets pipeline) ?.
- What are sockets?
- What is the Master-slave concept of active record?
- What are the Security Measures in rails?
- Make an SQL query to get the second-highest value from the record?
- How can we store sessions in rails and share session across multiple domains?
- What hidden fields are generated automatically in form_for.
- How to manage to store data in a single table if :
...Category has_many sub_category
...SubCategory has_many sub_type_catergory
...Sub_type_category has_many ……………….
...………………………………………………..
...…………………………………………..n number category.
- What major changes/new comes in rails 5.
- What major changes/new comes in rails 6.
- How to design bit.ly shorten url application? routes, logic, performance?
Contributions are welcome. If you would like to correct an error or add new items to the checklist, feel free to create an issue and/or a PR. If you are interested in contributing regularly, drop me a line at the [email protected] to become a collaborator.