热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

Ruby On Rails 面试题与答案

问题 41. WHAT PLUGIN WOULD YOU RECOMMEND FOR USER AUTHENTICATION AND AUTHORIZATION?

Devise works great with Rails. 

It supports OAuth authentication and therefore integrates nicely with Facebook. 

这有帮助吗? 添加评论 查看评论
 

问题 42. WHAT PLUGIN DO YOU USE FOR FULL-TEXT SEARCH in Ruby on Rails?

Sunspot supports full-text search capability and uses Solr as the back-end search engine to do so. 

You would include these two plugins in your gem file as shown below:

gem 'sunspot_rails' 
gem 'sunspot_solr' 

这有帮助吗? 添加评论 查看评论
 

问题 43. WHAT IS THE DIFFERENCE BETWEEN A PLUGIN AND A GEM in Ruby on Rails?

A gem is just ruby code. It is installed on a machine and it’s available for all ruby applications running on that machine.

Rails, rake, json, rspec — are all examples of gems. 

Plugin is also ruby code but it is installed in the application folder and only available for that specific application. 

Sitemap-generator, etc.

In general, since Rails works well with gems you will find that you would be mostly integrating with gem files and not plugins in general. Most developers release their libraries as gems. 

这有帮助吗? 添加评论 查看评论
 

问题 44. HOW CAN YOU IMPLEMENT A SEARCH FEATURE THAT SEARCHES FOR MULTIPLE MODELS in Ruby on Rails?

If you are using acts_as_solr for your search you will be able to use multi_solr_search to enable search across multiple models. 

Also, you can configure Sunspot/Solr to support search across multiple models.

Sphinx, another powerful search server can be used to search across multiple models and it works great. 

这有帮助吗? 添加评论 查看评论
 

问题 45. HOW CAN YOU UPLOAD A FILE TO A SERVER in Ruby on Rails?

Paperclip is the best solution to manage file uploads to a server.

It can also help you with multiple file uploads and associate it with ActiveRecord.

There are also good examples online that show how you can make rotating sliders with the paperclip images.

Another nice solution is using carrier_wave gem. 

The nice thing about carrier_wave is that it has good documentation on how to integrate with S3, Google & Rackspace for file storage.

You can achieve the same file storage capability with Paperclip as well though. 

这有帮助吗? 添加评论 查看评论
 

用户评价最有帮助的内容:

版权所有 © 2026,WithoutBook。