Click here to Skip to main content
15,886,258 members
Everything / Rails

Rails

Rails

Great Reads

by Danny Chu
Learn how to detect if client has JavaScript enabled or disabled at your backend webserver
by Aleksandr Ulanov
What are Service Objects and how you can use them to make your app cleaner and keep it maintainable
by Aleksandr Ulanov
In this article, we'll go through the basics of Hotwire, as well as build a sample app using it.
by Rocky R. Fernandes
Install Rails 4 and MySQL Server on Windows 7/8

Latest Articles

by Aleksandr Ulanov
What are Service Objects and how you can use them to make your app cleaner and keep it maintainable
by Aleksandr Ulanov
In this article, we'll go through the basics of Hotwire, as well as build a sample app using it.
by datarockets
Finding a vulnerability, using it for data extracting from the database, and fixing it with just one line of code
by Programming Tutorials by Tests4Geeks
In this tutorial, you'll see a very simple example of how to send a JavaScript response from the server and some of the more interesting things that can be done.

All Articles

Sort by Score

Rails 

29 Nov 2017 by Danny Chu
Learn how to detect if client has JavaScript enabled or disabled at your backend webserver
29 Aug 2022 by Aleksandr Ulanov
What are Service Objects and how you can use them to make your app cleaner and keep it maintainable
11 Aug 2022 by Aleksandr Ulanov
In this article, we'll go through the basics of Hotwire, as well as build a sample app using it.
10 Sep 2013 by ridoy
Netbeans(6.5 Beta) or Aptana would be a good one.See these 2 links to know about some more options!:Best IDE for Ruby [^]What Ruby IDE do you prefer? [^]
22 Jul 2014 by Rocky R. Fernandes
Install Rails 4 and MySQL Server on Windows 7/8
9 Jan 2018 by Programming Tutorials by Tests4Geeks
In this tutorial, you'll see a very simple example of how to send a JavaScript response from the server and some of the more interesting things that can be done.
16 Feb 2016 by Jason Floyd
Use Mina to deploy a Ruby on Rails app quickly and easily.
24 Aug 2016 by Member 11114915 - Tanvi
There could be two way to reach the solution here on the basis of front end developed to enter the details(by user).1). If on front end dropdowns/Radiobuttons has been used to select Hours, Subject, class then your plan is perfect.2). If user is entering details in textboxes manually...
9 Jan 2012 by lassebunk
How to create a location aware website using Ruby on Rails, PostgreSQL, and PostGIS
10 Jan 2012 by lassebunk
How to differentiate your stylesheets, and have different page styles using Rails 3.1, SCSS, and the assets pipeline.
8 Jun 2012 by shaziya syeda
Hi,I am working in ruby on rails and i am new to that.I need to invoke a rails controller method as onclick event of already existing links in my application.I learnt that it is not possible to invoke rails server method throug javascript which runs client side.I would appreciate...
8 Jun 2012 by Sridhar Patnayak
Hi Fathima, For this you have many approches are their to call server side method from client side.Some of them are PageMethods Ajaxpro (A third party javascript library) Jquery $.ajax() Many other approches...you can choose any of them ...
21 Oct 2012 by Dipali Barapatre
I am using Rails 3.0.5 version and Ruby 1.9.2 in my application.Its working fine in development mode but in production mode server goes down after every 3-4 days.It gives below error in /var/log/https/error.log file.[Sun Oct 21 09:39:03 2012] [error] [IP_ADDRESS] Premature end of...
30 Oct 2012 by Sumit Munot
This is the last error after which the application stops working[Fri Aug 31 02:07:23 2012] [error] [client 145.123.411.19] Premature end of script headers: [ pid=13552 thr=1 file=ext/apache2/Hooks.cpp:817 time=2012-08-31 02:07:23.257 ]: The backend application (process 13680) did not...
28 Jan 2013 by Member 9171128
I am new to ruby on rails?What software's i can install in my windows system ?How to install?Can any one help megive me some examples on rubyonrails examplesAnd also how to deploy this applications in aws?plz help me
28 Jan 2013 by Sergey Alexandrovich Kryukov
Look at this download page: http://rubyonrails.org/download[^].The very first link is source code, the very second one — Windows installer.—SA
27 Feb 2013 by Harshal Jumle
How can i create and publish my own gem file like jar file in java.Any link or walk through or tutorial of steps to accomplish this task.
31 May 2013 by Vitalij Dešuk
I have User, Prog, Enrollment model associated has_man through. Idea is that User adds Prog to profile and Prog can accept User's request or decline.
30 May 2013 by Vitalij Dešuk
I have made has_many through association on User, Prog and Enrollment. To be able to add Prog to User I did something like: enrollments#createdef create @prog = Prog.find(params[:id}) @enrollment = Enrollment.create(user_id: current_user.id, prog_id: @prog.id) redirect_to...
2 Jul 2013 by Mamun From Bangladesh
Asking on fedena issuemishu - Thu, 2013/06/13 - 13:45.Brother, i have install fedena on ubuntu 11.04.it work fine.But from student profile,when i try to get dicussion i am getting this error:NoMethodError in GroupsController#indexundefined method `member_groups' for...
3 Jul 2013 by CHill60
There are full instructions on the fedena site http://www.projectfedena.org/install[^]Looking at the error above I don't think you've done step 3 "Install MySQL"
14 Sep 2013 by Member 10253442
QUESTION: My need is to include a specific datepicker for EACH form when a specific button is clicked. Im not sure whether what im doing below in the jquery portion of the code for the datepicker is correct? Can someone please guide me with this? ThanksDETAILS: I am currently using a hidden...
10 Sep 2013 by saad_lah
AoA, I am going to develop replica of wikipedia for my semester project, and I have decided to make it on ruby.I have used ASP.NET C#, and I am kinda useto of Visual Studio(currently of 2012), just because of its extra ordinary intellisense of getting functions, variables etc from not only...
2 Oct 2013 by Hoa Súng
I get stuck when I would like to create a treeview in my site like this: - I will add a textfield: "Add new category" and a button: "Submit" - When click on "Sumit" a new category will be created, Product and History subpages should also be created automatically. - In Product has a...
12 Nov 2013 by boombidibam
Hello,I have developed an app using Adaptive payment API, pre-approval. My platform (ubuntu server, Rails, mysql) is using GMT+4 time.-->We are the Nov 8.a/ at 6pm in the afternoon (GmT+4), Start Date for pre-approved payment from a user living using GMT +1 is correct and shows Nov...
9 Nov 2013 by OriginalGriff
Never, ever, accept code from a insecure website to handle anything to do with real money.You do not know who is giving you the code, you do not know what it does, you do not know that it places the monies correctly into the appropriate account, without passing the details to any third...
11 Nov 2013 by Hoa Súng
I set up already Canvas LMS on my computer and now I want to add new language as vi.yml under folder locale. But I don't know how to config this new language which will be applied and set to default language.
19 Dec 2013 by Sanjay Salunkhe
I have made an angular app with rails as a backend.I have read lots of blog and articles about how to make an angulajs app crawlable.for example - : "http://www.example.com/#!/home" Google bots will convert this url into "http://www.example.com/?_escape_fragment_=/home".I have written...
27 Jan 2014 by Bindi Bhatt
Currently i'm not having any code , i'm not getting the way to do this but i want to learn asap ,so please anybody can help me with this. I'll glad if any can do this .Thank You
27 Jan 2014 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
If you want to do it in JavaScript, then analyze the HTML rendered on browser for the ListBox.Suppose it is a table having rows for each item. So, you need to create one new row and append that to the existing table. That will create a new ListBox item.That's it.
27 Jan 2014 by Kornfeld Eliyahu Peter
I Googled it for you:Quote:add textbox value to listbox using jquery
31 Jan 2014 by E.F. Nijboer
Yeah, it simply checks that you don't use publicly known information as a password because that would make it to easy to break it. Good lucl!
2 Feb 2014 by Member 10535639
Plz ..in deatail ...what this spec do while start a rail application
2 Feb 2014 by Richard MacCutchan
This question is far too broad for a Quick Answers forum. Try https://www.google.com/search?q=ruby+on+rails+controller+spec[^].
11 Jun 2014 by Mdzzzl5
I would suggest, as a good starting place: Make Your Own Gem from the RubyGems website[^]Hope that helps
18 Jul 2014 by Viral Prajapati
please help me to solve it...i am working in ruby with store procedure with following code.... call_stored_proc_verb="exec" name="dbo.SpData" args=1 sql = "#{call_stored_proc_verb} #{name} #{args}" results=ActiveRecord::Base.connection.execute(sql) ...
25 Aug 2014 by Member 8065843
Do you have any article which describes about Making a Class Schedule Using a Genetic Algorithm using ruby on rails?
13 Dec 2014 by Member 11309086
I have created a rails app for booking cabs online. I want my app to have the functionality of sending emails to users once their booking is confirmed. For this, I am following Ryan Bates railscasts: `https://www.youtube.com/watch?v=v1KI571TdUQ`I started with creating a setup_mail.rb...
14 Dec 2014 by Member 10789046
I've made a functional mini social network app in Rails. I'm using the Sync gem in order to make my app realtime so that when a user posts something, it'll immediately show up on their home feed. I feel like I'm extremely close to making this work. The form works and there are no run-time errors...
6 Jan 2015 by Gregory Gadow
I've been learning Ruby, and would like to translate some Response filters I had written in VB.Net some years ago. I have been told that Rails has an equivalent slot, where you can modify a document after it has been processed by Rails but before it is delivered to the user. My sources disagree...
12 Jan 2015 by Hapisha
I m trying to install redmine on my PC using the installation step http://www.redmine.org/projects/redmine/wiki/redmineinstall[^] found here. but getting the error please configure your config/database.yml first while executing the command "rake generate_secret_token" . i need help on this...
9 Mar 2015 by Mdzzzl5
Not trying to seem smart-alecky, but have you opened config/database.yml and filled it in with the correct values to access your database? That would be my first guess. If you've left the default values, Rails can't access the db.
15 Mar 2015 by manchanx
Here's an online book on Ruby On Rails: https://www.railstutorial.org/book/beginning[^]From the first paragraph:[..] the Ruby on Rails Tutorial will give you a thorough introduction to web application development, including a basic grounding in Ruby, Rails, HTML & CSS, databases, version...
15 Mar 2015 by User 59241
There are a number of RoR forum engines to choose from. Maybe start by having a look at them:https://www.ruby-toolbox.com/categories/forum_systems[^]You did not say why you want to do this because there are many easier ways to set up a forum.
3 Apr 2015 by Syed Muhammad Ali Gardezi
I am trying to figure out the problem(I am new to ruby ) that I am facing but I can't figure out the problem. I can't figure out how to explain the problem so if you have an doubt you can ask.now getting to the main question When ever updateRequest function of the request is called it throws an...
29 Apr 2015 by Nagy Vilmos
I am building a small app using Ruby on Rails, and I am trying to rationalise my views.Every view [.html.erb] is becoming the same thing: Page Title ...
30 Apr 2015 by Torakami
Hi , I have created one controller and added default 7 action methods , I have also created 4 views and those are index , new , show , edit all contains difeent data also added resources :posts controller configuration into my routing file as well 'My problem is when i try to...
7 May 2015 by hai nguyen ngoc
ActiveAdmin.register Link do member_action :scan, method: :get do resource.scan_jobs # => Resque.enqueue_at( 1.minute.from_now, resource.scan_jobs ) ? redirect_to '/', notice: "Scan!" end index do selectable_column Link.column_names.each do |field| ...
20 May 2015 by Torakami
I am new on rails. Below is what i am tryingclass Category
23 Aug 2015 by Martin Zinovsky
Hi guys!I have archive about 2gb size and I need to add bunch of the txt/config files in response on user interactions. How can I do that in ruby/rails?Thanks!
19 Oct 2015 by E.F. Nijboer
It is called a Hash Rocket. Used for creating hashes like this {key1 => value1, key2 => value2}By the way, new style syntax (Ruby 1.9) is: {key1: value1, key2: value2}Good luck!
20 Oct 2015 by priya dharshan
This is called Arrow functions.An arrow function expression (also known as fat arrow function) has a shorter syntax compared to function expressions and lexically binds the this value. Arrow functions are always...
5 Nov 2015 by TheWajid
Is SQLite is the only supported Database Management by Ruby on Rails?
5 Nov 2015 by Mehdi Gholam
No, an example of the others : https://www.digitalocean.com/community/tutorials/how-to-use-mysql-with-your-ruby-on-rails-application-on-ubuntu-14-04[^]
30 Nov 2015 by rudy-peto
Hi, I really appreciate any respond for this simple question.test = Model.find_by_sql("SELECT number FROM tbl_one LIMIT 1").each do |a| p = a('number') puts pendLook, I mean, after store a value to 'p', how do I add the 'p' value by 1.puts p + 1I tried it but doesn't...
30 Nov 2015 by rudy-peto
Ups!Sorry, my mistake.. I found it! p = a('number').to_iThen I can add the value by 1 easily..
6 Apr 2016 by Member 11617113
I have two models. models/Resident.rb : has_many: leavesmodels/leave.rb: belongs_to: residentNow what I want to validate leave model attributes before they get created..leave.rb attributes : start_date,end_date,destinationhere is my leave model:class Leave
28 Apr 2016 by Karthik_Mahalingam
check thisjQuery The noConflict() Method[^]Avoiding Conflicts with Other Libraries[^]jQuery.noConflict() | jQuery API Documentation[^]
17 May 2016 by dravoss
Hello ,i tried to use this code to replace any __Random_and[x,y] with rand(x,y) but it didn't run please help me function charCallbackRand($matches1){ $charOne = (int)$matches1[1]; $charTwo = (int)$matches1[2]; return rand($charOne,$charTwo); } $myword =...
17 May 2016 by George Jonsson
Instead of using a preg_replace_callback() you can directly insert the wanted numbers from the original text with preg_replace()Try this:$string = '__Random_and[22,95]';$pattern = '/__Random_and\[(\d+),(\d+)\]';$replacement = 'rand($1,$2)';$result preg_replace($pattern,...
17 May 2016 by Patrice T
RegEx only apply on strings, not on code.function charCallbackRand($matches1){ $charOne = (int)$matches1[1]; $charTwo = (int)$matches1[2]; return 'rand('.$charOne.','.$charTwo.')'; } $myword = '__Random_and[22,95]'; $result =...
24 Aug 2016 by Member 12701313- questforimprovement
I'm trying to create a planner for teachers, as a personal project, where the Users (teachers) can click on a day (in a calendar, that's been already created) leading to a page where they can add a Subject, Hours, Class. All of this, along with the User_id and Day should be updated in the...
16 Sep 2016 by Paul Yi
I have button/link that takes a screenshot when clicked. How can I automate this to click the link on all pages to take the screenshot by a script so I can have all screenshots available. Trying to avoid having to go to all pages to click that button manually. Possibly through a rake but I've...
20 Jan 2017 by Member 12960523
Hi, I am trying to build a ruby on rails application but I am unable to resolve this issue:ERROR["test_should_redirect_update_when_not_logged_in", UsersControllerTest, 3.086077447998832] test_should_redirect_update_when_not_logged_in#UsersControllerTest...
6 Mar 2017 by Member 13041006
Hello,thanks a lot for you help. I am having some issues in understanding how fields_for works. I have a location model that has_many :ads. I would like to do a form for filtering locations and ads. I am thinking of using the following syntax:
6 Mar 2017 by Member 13041006
Ok. I found out the solution using nested attributes hear is the link to the explanation.Ruby on Rails, two models in one form - Stack Overflow[^]