Câu hỏi phỏng vấn Ruby on Rails
Câu hỏi

Mention what is the difference between a gem and a plugin in Ruby?

Câu trả lời

The main differences between gems and plugins in Ruby on Rails are:

  • Gems are packaged Ruby libraries that can be used in any Ruby application, while plugins are extensions specifically designed for Ruby on Rails applications[1][2][3].

  • Gems are managed by RubyGems and installed system-wide, whereas plugins are installed directly into a Rails application, often in the vendor/plugins directory[2][3].

  • Gems provide functionality that can be used across different Ruby projects, while plugins add custom functionality tailored to a specific Rails application[1][4].

  • Gems are pure Ruby code, while plugins can contain Rails-specific entities like models, controllers, views, and migrations[4].

  • Gems are easier to keep up-to-date and can be used with dependency management tools like Bundler, while **...

junior

junior

Gợi ý câu hỏi phỏng vấn

middle

What is the purpose of the rakefile available in the demo directory in Ruby?

senior

What is ActiveJob ? When should we use it?

entry

Explain what is rake in Rails?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào