Ruby Interview | Ruby on Rails – Telegram
Ruby Interview | Ruby on Rails
476 subscribers
14 photos
2 links
The Ruby Interview channel is a resource for preparing for Ruby developer interviews.

It features questions, problem-solving solutions, and interview tips.

Contact:
@Connor_1992
Download Telegram
Which of the following methods adds an element to the end of an array?
Anonymous Quiz
8%
add
72%
push
4%
insert
16%
append
Which of the following methods converts a string to a number?
Anonymous Quiz
5%
to_integer
3%
to_num
90%
to_i
1%
parse
Which design pattern is typically used to construct objects with complex creation logic?
Anonymous Quiz
3%
Observer
9%
Singleton
46%
Builder
43%
Factory
What is the name of the architectural style that separates responsibilities into models, views, and controllers?
Anonymous Quiz
1%
REST
10%
MVP (Model-View-Presenter)
1%
MVVM (Model-View-ViewModel)
87%
MVC (Model-View-Controller)
Which SOLID principle is violated if a class is responsible for both data processing logic and data persistence?
Anonymous Quiz
8%
Open/Closed Principle
8%
Interface Segregation Principle
4%
Dependency Inversion Principle
81%
Single Responsibility Principle (SRP)
Which Ruby library is most commonly used for dependency injection?
Anonymous Quiz
7%
Sidekiq
46%
Dry::Container
10%
Faraday
36%
ActiveRecord
🥴5💩3👍1👏1🤣1
Which of the following commands is used to create a new migration in Rails?
Anonymous Quiz
84%
rails generate migration
12%
rails db:migrate
4%
rails generate model
0%
rails db:rollback
How do you execute raw SQL queries in ActiveRecord?
Anonymous Quiz
69%
execute
8%
raw_query
20%
find_by_sql
3%
query
🔥4👎1
Which gem is commonly used in Ruby to manage PostgreSQL-specific features like JSONB and arrays?
Anonymous Quiz
18%
ActiveRecord
72%
Pg
7%
Sequel
3%
Redis
👍2
Which of these is NOT valid Ruby syntax?
Anonymous Quiz
28%
x = ->(a, b) { a + b }
57%
y = { |x| x * 2 }
5%
z = Proc.new { |n| n ** 2 }
9%
a, b = [1, 2]
What will the following code output?
Anonymous Quiz
66%
1
19%
0
10%
2
4%
nil
Which of these Ruby keywords is NOT related to exception handling?
Anonymous Quiz
3%
rescue
42%
catch
7%
raise
16%
ensure
32%
retry