I'm looking for a simple quiz gem in Ruby on Rails. It needs to present the user with multiple choice questions (radio buttons, checkboxes only), tally up the right/wrong answers, and display the results at the end. The quiz will be about 25 questions - 1 question per page. It also needs to integrate with the site I'm building, so it can't be a standalone site, or third-party site.
So far I've found this gem, which looks promising:
https://github.com/NUBIC/surveyor
Anyone know of any other Quiz gems in Rails?
The surveyor gem is quite powerful and I can recommend it. There is one thing that you should note: you write the survey in a dsl (ruby file with special, easy to understand syntax) and then run a rake task. This means that it's very useful for a one-off survey, where a developer can generate it (much easier and faster than doing it manually), but not if you want a non-technical person to generate surveys on her own.
Related
I was reading an article titled The Secret Behind Twitter's Growth, and I noticed something that made me a little confused:
The third paragraph which gives some background began with this:
"The popular Web programming language Ruby on Rails is responsible for the look and feel of Twitter’s user interface..."
Now, I know that RoR is for back-end development, so how is it possible to use it in the user interface aka the “front end”?
link to the article: https://www.technologyreview.com/s/412834/the-secret-behind-twitters-growth/
You can display data from your database in your views.
You can use ERB(embedded ruby) inside of your HTML to display cool ruby coded front end stuff (the current date for example).
You can use all kinds of cool gems like(pagination) which sorts long lists into multiple pages etc.
And also; Ruby On Rails is not just backend, it's a framework where you can use practically any front-end languages/tools(Javascript, Coffeescript, HTML5, CSS, XML, AJAX, Angular.js, React.js, SCSS, LESS, you name the rest) aswell.
In short; The list is endless, you can do a lot to improve the user experience.
If you are really interested in this exact stuff, you can read the book 'The Ruby On Rails Tutorial' by Michael Hartl where you can build a copy of the Twitter website along with him. Then you will see exactly how Ruby on Rails helps improve the user experience. And you will learn a lot aswell :)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
When I am writing this, I must admit that I am already inclined towards RoR.
I have gone through official "Getting Started" tutorial and created a sample RoR app.
I have also had glance through guides.
While creating sample app, I loved the ways Rails auto-generate a whole lot of code for me, and creates a nicely organized directory structure.
Creating simple sample app is fine but now I have following questions before choosing RoR for enterprise web app.
Following are question in my mind.
How would I debug my app? While working on Java + Spring, we could step through in Eclipse, read about ruby-debug which is like command prompt debugging. Aren't there any IDE debuggers?
How would I combine all javascripts etc? in Java=Spring framework I had earlier used Google closure template for minification and joining all javascript files. would it allow sourcemap support?
Image Spiriting ? Any quick link to just look through if its possible or not?
Authentication and security : I am sure it must be possible in Rails to get logged in user's profile and then check what are db objects we can view and update, it will specific to one's web-app. Can anyone give some links, to just look through if its possible or not? can we protect the URL based on roles as we can do in spring? How do we integrate FB/Google login
Templating : While creating sample app, realized that Rails supports templating in html through embedded ruby tags, thats cool but having seen it work two more questions.
5.1 : :construct like :confirm etc would depend on jquery_ujs.js, thats perhaps
shipped with rails, but I may not want to 'jquery_ujs.js' I may have my own
different styling for modal dialogs. How do i replace jquery_ujs.js and plugin
something else ?
5.2 : app->view->layouts->application.erb.html , allows you to setup up title of all
pages and what goes in header of all pages.
But I may not want the same title and header for all pages of my web-app,
It would be different for each page. How do we do that in rails?
DB : most probably I am going to use DynamoDB as and use memcache for caching,
Any simple and sample code for pluging in the memcache in rails for dynamo
Maintaining three environment: How to we maintain three different environment in Rails, Production, staging and dev
Would i be able to use less instead of css?
As everything, there are more than one way to approach to every single question.
I usually use pry-remote to debug my rails application, because I use pow server and I use Sublime Text, but RubyMine is a nice IDE for developing Rails apps and it has a build in debugger.
Sprockets takes care of this and it's integrated in Rails. I use SASS and CoffeeScript, and you can generate source maps easily for them using those gems - sass, coffee
You can use Compass to generate image sprites pretty easily. (Check out this episode on Railscasts - Compass & CSS Sprites
Devise gem is really popular solution for authentication and for the Facebook/Google+ you can use OmniAuth which integrates nicely with Devise. And for authorisation, a really popular solution is Pundit gem.
You are free to use whatever JS UI library you like and for the dynamic layout content you can use content_for helper. You just have to add yield :page_title in your layout and then, call the content_for :page_title { 'Specific title' } in your views.
For this question, I don't have an answer but I am pretty sure that there is a gem that can help you with this like Dynamoid for example
Rails supports different environments out of the box (testing, development, production) and you can easily add your own ones.
Rails has a support for SASS out of the box, but you can easily switch to LESS. Check out less-rails gem.
Rails is pretty mature framework and the community around it is pretty good, so you can easily find a gem that can help you solve specific problem. And there are quite a lot resources around the internet.
Good luck :)
i will give a short glance
ANSWER-1
There is no such debugger like eclipse for ROR, you can use sublime_text editor for editing, Rspec is nice tool for RoR.
Answer-2
In RoR there is no need to combine all js files,you can write any of the .js file it will be render to application.js default
Answer-3
Link to question
Answer-4
There are gems in RoR which wil easily help you to do stuffs like authentication, omniauth etc..
RUBYGEMS
Answer-5
There are many ways you can easily find out asking on stackoverflow for your problem.
Suggession:
Instead of asking many question you should try to learn ruby deeply you will easily get your answers.
I need to write multiple choice tests in a Rails app. What I'm looking for is a gem that will generate the schema (the questions and answers should be data-driven), validate that all questions have been answered and score the test.
New questions should be able to be added and deleted at will without effecting completed tests.
Ideally it should use a generator so that I can edit the resulting controller, models and views.
Are there any good Rails gems that can satisfy these needs?
Note: The app is Rails 3.0.9
I wanted to make a web site with the following basic features- (1)User registration for buyers and sellers. (2)profile pages (3)A buyer should be able to post work and should get profile links of the corresponding seller who has expertise in that work.
As time progresses i would want to add more features to the site.The freelancer sites where user can post jobs and get bids is the best example of the work.
(1)I want my code to be maintainable as i woud be adding features later on. (2)It should be quick to develop. (3)Resources should be available(not the entire thing, atleast in bits and pieces) for the above requirements and should not be tough to find for future enhancements. (4)Design should be decoupled from the buisness logic as i would outsource the design work.
I was thinking of Ruby on Rails for this work as i have experience in the MVC model and RoR looks cool.I am from the mobility domain so i don't know whether RoR will suit my work
Would RoR suit this purpose.If yes where can i find the resources to the above mentioned requirements.
Thanks
Ruby on Rails would be ideal for this type of website.
Check out some of these resources for info on how to use Ruby on Rails:
http://guides.rubyonrails.org/
http://railscasts.com/
http://www.railsforum.com/
I noticed you are already aware of TeachMeToCode, but there is a tag there for all the Rails 3 tutorials, with some blog tutorials and what looks like the beginning of a series on how to build a del.icio.us clone. Since they are in Rails 3, they would be well worth checking out:
http://teachmetocode.com/screencasts/tag/rails-3/
One of the best tutorials:
http://railsforzombies.org
It will let you have your own point of view quickly.
It depends on with which languages you have experience. Any good MVC framework will do the job just fine but if you like Ruby syntax RoR is definitely a good framework to develop this kind of application.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am starting to learn Ruby on Rails. I have an application in mind that I would like to create, but I know I'm going to have to repeat a lot of the things that have already been done a million times (such as user authentication, etc).
I just found out about rails templates. From what I understand, you can use one of these templates to create a new rails application and set up a lot of the basics. Where can I find some of the most popular templates, and should I use one of them?
Andrew, if you are starting to learn RubyOnRails and have an application in mind, I suggest you DO NOT use any templates at all and do it by hand.
Rails templates primarily pull in gems and other external dependencies (plugins) into your app. The primary benefit of templates is for people who build so many Rails apps so often that they'd like to get bootstrapped really quickly.
You would learn more and feel much more confident about the whole process if you consciously chose the plugins/gems you need and progressively added them to your app.
Devise (popular authentication gem) goes so far to say, that if you are starting with Rails app, you should NOT use it.
Here's a more current answer which applies to Rails 3 (the other answers are all from January 2010).
After playing around with editing application templates for a few months, I've found it can be a headache to assemble and maintain a application template. It helps to have a collection of "recipes" that can be maintained individually, then assembled into an application template.
I'm using the
rails3_devise_wizard
which is a version of the RailsWizard gem with custom recipes for a Devise starter app.
I've used it to create two application templates:
Rails 3 + Devise + RSpec + Cucumber Application Template
Rails 3 + Devise + RSpec + Cucumber + Mongoid Application Template
which generate the following example apps
Rails 3 + Devise + RSpec + Cucumber Example App
Rails 3 + Devise + RSpec + Cucumber + Mongoid Example App
and each has detailed tutorials showing how they're built:
Rails 3 + Devise + RSpec + Cucumber Tutorial
Rails 3 + Devise + RSpec + Cucumber + Mongoid Tutorial
Jeremy McAnally maintains a diverse collection here: http://github.com/jm/rails-templates/
I don't think there are any silver bullets, but they display a lot of techniques that templates allow.
Rails Kits may also fit your needs, even though they're not actually Templates:
http://railskits.com/available-kits/
There are several ways to extend a Rails application and/or start one off. You've mentioned just one of the big four. The others are:
Plugins
Engines
Gems
Templates
Templates are generally used to start out an application, but if designed correctly, you can use them to extend one. For example, many stock templates out there help setup a code repository, install a few plugins/gems, and perhaps fix up the layout a little so you don't have to. Of course, you'll usually do most of these when you first start out a project. At our company (3 developers) I created a template that sets up our dev and production environments, repositories, project tracking. Here's my favorite stock template: http://github.com/lhoeg/app_lego/network
(The original hasn't done much work on it in a while, and I believe this is the best fork out there now)
Plugins and Gems are more or less becoming synonymous and there's little reason any more for people to create plugins, as gems are the more Ruby-standard way to package functionality. Generally you'll use plugins to add bits of very specific functionality to your application. This can range from adding user authentication, to calendaring, to adding locations and mapping to your app. Most plugins that I've used extend the ActiveRecord or database part of the application. If the plugin comes with views, controllers, or modifies your database tables it'll usually come with a generator. A good example is the Restful Authentication plugin's generator. A relatively good list of http://agilewebdevelopment.com/
Engines are the kings of modularity. They usually provide a lot more functionality than plugins. Whereas plugins and gems generally extend Rails itself, Engines are intent on extending YOUR application by adding a full set of views, controllers and models. Thus engines are entire Rails applications packaged into a neat little box that you can just plop into your app and instantly add a bunch of functionality. There's also an Engines directory at http://agilewebdevelopment.com/ but as you'll see, there aren't very many.
Hope this helps!
Berns
Try to search on github, there are really a lot of cool stuff. http://github.com/search?langOverride=&q=rails-templates&repo=&start_value=1&type=Repositories
If you search a example of authentication try to search a authlogic-example on github.
Ryan has some Rails templates: http://github.com/ryanb/rails-templates
It seems Jeremy's repository gave me a 404 when I tried it.
We have developed a Rails application template.
https://github.com/agilie/Rails-Application-Template
For now it contains testing, deploy, documentation generation functionalities, sidekiq, redis and much other gems and stuff.
It is fully customizable and you can easily enhance it for your needs. Feel free to fork and make some pull requests.