Click here to Skip to main content
15,885,870 members
Everything / Programming Languages / Ruby

Ruby

Ruby

Great Reads

by Marc Clifton
Locate your Facebook friends on a Google Map - A Ruby on Rails web application
by Arthur V. Ratz
In this brief article, we will demonstrate how to deploy a Node.js application and run it on Docker's Windows Server Core 2016 Containers
by Aleksandr Ulanov
What are Service Objects and how you can use them to make your app cleaner and keep it maintainable
by Paul Aurelian Gagniuc
This article shows how to mix two signals into a third, in variable proportions.

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 Paul Aurelian Gagniuc
This article shows how to mix two signals into a third, in variable proportions.
by datarockets
Finding a vulnerability, using it for data extracting from the database, and fixing it with just one line of code

All Articles

Sort by Updated

Ruby 

18 Mar 2016 by 1suli0
When I tried to run my Sinatra app, I got this error: C:\Users\A2\Desktop\freetouring_v2>rackup -p 4444The system cannot find the path specified.The system cannot find the path specified.The system cannot find the path...
3 Aug 2014 by _Asif_
If you really are looking some serious stuff and have passion for it then my advice for you to start with VC++ because it is only VC++ that can you give you most of the flavor, whether its device driver development, desktop applications, web applications, server side applications, mobile...
20 Mar 2014 by Abhinav S
Learn Ruby AND C#.Practice since just going through books will not help.
13 Apr 2009 by adminmyserver
Ruby on Rails application for the world's fastest server data.
3 Aug 2014 by Afzaal Ahmad Zeeshan
My name is shuvo. I am new to the world of programming.Hello brother, my name is Afzaal Ahmad Zeeshan and I have 3 years experience in Programming, Software as well as Web Site development. I would answer your question using the view that I had when I started to write the codes. I am...
21 Jun 2020 by Afzaal Ahmad Zeeshan
I think it is because the testing software is configured to accept only a specific result, as you can see in the following code: Failure/Error: expect($stdout).to receive(:puts).with("Hello Kent Beck!") You can fix this by removing the extra...
14 Dec 2018 by Akin0
Hello, So I am working with Ruby, and... I have an error "ERRNO::EEXIST, text line 2 ... File exists" The error occurs if a directory it created (defined in EGGPATH) already exists, which should work in itself because of "unless File.exist?(EGGPATH)" While what I'm trying to do is: def cyhm ...
15 Dec 2018 by Akin0
Okay, so the problem actually was -- Ruby cannot stand checking the names that have other characters than English alphabet in itself. That was actually pretty hard to come up with, but I guess this is the solution.
28 Apr 2011 by Albert Holguin
Looks like you're missing a .lib dependency.[edit]As an FYI...If you're aware of the conversion data loss issues, you can get rid of the warning by simply casting the data. That'll let the compiler know that you're doing that on purpose instead of by accident.double y = 3.14;float...
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.
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
22 Jun 2013 by Andreas Gieriet
First of all, have a look at Stuck-at-Fault[^] to get an understanding on what this exactly mean.Then follow up with Design-For-Test (DFT)[^], which is an approach to get this fault model under control. Finally, get an understanding on Automatic-Test-Pattern-Generation (ATPG)[^] for the above...
17 Nov 2014 by Anil Kumar Ch
Hii am getting an error while installing ruby : when i used commandgem install json --no-ri --no-rdoci am getting an exception error saying gem files remain installed in c:/Ruby200/lib/ruby/gems/2.0.0/gems/json-1.8.1 for inspectionresults logged in...
13 Oct 2014 by Anuj Dubey
Need some more details. According to your question I think you have to set the column length through model. Let's say we have a model called customer.rband we have a column name "first_name" and we have to set its maximum length to 30 characters.If the length exceed 30 characters then...
1 Sep 2018 by Arthur V. Ratz
In this brief article, we will demonstrate how to deploy a Node.js application and run it on Docker's Windows Server Core 2016 Containers
15 Apr 2013 by arulbaskar
configuration.yml development: email_delivery: delivery_method: :smtp smtp_settings: #tls: true #enable_starttls_auto: true openssl_verify_mode: 'none' address: "domain name" port: 25 authentication: :login domain: 'mail...
7 Sep 2014 by Asad Ali Bhatti
if u are using rvm then u must do1. rvm use [ruby version].2. rvm gemset use [gemset name].(if u dont have gemset yet, create using rvm gemset create [name];bundle install;)3. now you are ready to go.
27 Feb 2015 by ashu2188
Hi,I am fairly new to Ruby and figuring out how it works. I have been assigned a task to create a script where I need to take 2 csv and replace data from one csv to another for certain column.I don't know how do I get the column count. I guess if I can get the column count, I can...
27 Nov 2009 by AspDotNetDev
What type of ideas are you looking for? Do you want us to design it for you? Because if you do, we will not. If you are looking just for some fresh eyes to help you brainstorm, then you're going to have to be a lot more specific than the information you've given. And you should probably...
27 Jan 2010 by AspDotNetDev
Look at the top of the page... see the large green menu? One of the items there is Job Board. You can go there pay developers to code stuff for you.
7 Oct 2011 by ASPERSICA
I fixed it myself by adding:@order.build_userin order_controllerdef new@order = Order.new@order.build_userend
7 Oct 2011 by ASPERSICA
I have two models:class User
16 Feb 2015 by Atinesh
During my college I studied C/C++, C#.Net and ASP.Net. Now one my friend suggested me to learn Python & MATLAB also. He wasn't much specific why to learn these languages, He said it would be helpful to get a job with these languages. I've also seen lots of good resume, mostly they have Python...
16 Apr 2018 by Authorize.Net
The Authorize.Net API makes it easy to create, capture, refund and void secure payment transactions. Offering both XML or JSON, it works well with Ruby, Node.js, Python, and many other languages. The streamlined API also has the bandwidth to accept payments in every environment.
4 Apr 2015 by awacate
Hi guys! So I was trying to execute a very simple ruby file that I saved in my user folder (by default) and I tried to execute it from Terminal (I am on the Yosemite version). After entering:#!/usr/bin/env ruby(then dragged the file to Terminal) it gives me this:-bash: (file)...
19 Aug 2008 by baker.alex
Generate source code and database scripts for any language or platform.
9 Jan 2018 by Baylor11
-I am wanting to build a website. -I intend for the website to be a platform where the end user (A manager) will login and be able to create bids for customers and be able to export to excel or PDF. -To piggy back off of the previous, I would like to build a platform that the end user (field...
4 Sep 2014 by BBCokeley
Im new to ruby, and have chosen a self learning course for expanding on current languages. I bought a book but the examples are so vague and badly written that you can pull nothing use full from copying them.guys, below is a script for opening a file spliting the words and hashing them. then...
4 Sep 2014 by BBCokeley
solved:was a bit more obvious than i thought, 2 frikkin days it took me to work out that you can load the file, split the paragrahs/words and then sort them.....longest = File.open('my_text.txt') {|f| f.read }.split.inject do |memo,word| memo.length > word.length ? memo :...
4 Sep 2014 by BBCokeley
mind boggled, the scoll on the irb window does not contain all the results of the query i wrote, i know this as i reversed the query in desc and it shows other things.can i write the irb output (all of it) to a txt file?any guidance is appreciated, puling hair out trying to find...
5 Sep 2014 by BBCokeley
$stdout = File.new('console.out', 'w')done
16 Dec 2013 by Behrouz Bokharaei
Hi Every one,Which one is simpler to learn and coding, Ruby or java?
27 Feb 2012 by benton2206
I just joined this website in search of help in mainly learning programming languages and to gain a bit of know how in to making my own and applying it to an IT device to make it work. I would be very delighted if some could assist me or if you have had experience in this type thing point me in...
9 Jun 2019 by bigyan sahoo
Hi, I am new in ruby. I will give here one example in .NET. The same encryption data I need in ruby. .Net Code-: using (SHA1 sha = new SHA1CryptoServiceProvider()) { byte[] computeHash = sha.ComputeHash(enc.GetBytes(plainText + "." + ConfigKey)); } First it...
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
4 Apr 2016 by BladeLogan
Hello there! im really not sure if this is the right place to ask this but here is the story.I've been programming in C# for quite a while now and I am able to write software etc but I dont feel like C# programming is going to get me anywhere, since first of all the UI is so outdates it...
14 Mar 2015 by Braydon
I'm looking for a tutorial on how to make a forum using Ruby On Rails.I've looked for something but I can't seem to find anything so can someone else help me?I would be Very Glad!!
28 May 2015 by Brisingr Aerowing
puts("What do you call a girl whose tongue is out all the time!")what = gets.chompwhile what != "miley" puts("Try again! Think and twerk!") what = gets.chompendputs(what.chomp+ ". Wow, you have no life".chomp)The input had a new line at the end. The chomp method will...
24 Aug 2014 by brka.brkb
Hi,I have a 12 year old son who has gotten fairly far along teaching himself how to program in Java, i.e. he's been learning it through Khan Academy and "How to..." books for the last four months, spending 2 hrs a day on average.I'd like to know:1. If Java is an appropriate language...
21 Oct 2013 by Carlos Luis Rojas Aragonés
First web service with Ruby, Sinatra and Datamapper
10 Mar 2018 by Carlos Luis Rojas Aragonés
Formatting your rails specs with rspec_pacman_formatter
6 Mar 2011 by cdpace
Hi everyone,I have the following class:public class Test{ public string Name {get;set;} public List stringitems {get;set;} public List subclassitems {get;set;}}public class SubClass{ public string Value {get;set;};}And I want to pass this as a...
24 Sep 2022 by Chang Zying
I’m new in Ruby on Rails, how can I get the outlet id which is not at the product migration table , because category id has at product migration table, I can get it through product but how outlet id? I want to get it and put at the add item there...
5 Jul 2013 by chenghuichao
I am using .net(C#,asp.net...) for 5 years, now I want to learn a second language, which the beast choose, Java? C++? Object-C? Ruby? PHP?......I want to learn them all ,but I now I want to stay focus on it. so choose is important.thanks
29 May 2013 by chevuru narendra
please help me creating a timetable generator for a class. i am new learner of ruby on rails. My professor gave a task that is enter subjects ,time , weekdays it will automatically create a class timetable.
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"
24 Jan 2010 by Christian Graus
That's awesome. You have a link to your business, but you don't even know what Linux is. Don't give up your day job, and if this IS your day job, get used to poverty. I deleted your post that was an advertisement for your company, BTW.
28 Feb 2020 by Christian Specht
After years of executing a “build and upload per FTP” batch on my machine, I now have a GitHub Pages-like experience when updating this site..
30 Mar 2016 by CodeProject, Val Polouchkine
Welcome to our continuing series of CodeProject interviews in which we talk to developers about their backgrounds, projects, interests and pet peeves. In this installment we talk to Val Polouchkine, a Developer Advocate for Twitter.
8 Aug 2014 by Corey Fournier
ROR in production Windows
24 Oct 2010 by CPallini
Do you know about Google[^]?
10 May 2012 by CPallini
If you are a develeper than you should try to code it yourself (note that is a very basic task). On the other hand, if you are NOT a developer, then, well, Q&A is not the right place to post at.
11 May 2012 by CPallini
What you really need is a Ruby tutorial. There are many available[^].
3 Aug 2014 by CPallini
There is no best language, of course. There are languages better suited for some scenarios than others.If you need a language that can be used on most platforms and has good demand then you could pick, for instance Java.
17 Sep 2015 by CPallini
Google is your friend[^].
26 Sep 2022 by CPallini
Thisputs "how many items?" items = gets.to_i arr = Array.new(items,10) for i in 0..items-1 puts "please enter item #{i}" arr[i] = gets.to_i end should fix your code. Now it is up to you actually fulfilling the requirements.
2 Jul 2021 by datarockets
Finding a vulnerability, using it for data extracting from the database, and fixing it with just one line of code
21 Jul 2017 by Dave Kreskowiak
No, no, no. We're not here to do your homework for you. This industry is already too full of people who don't have a clue what their doing and beg other people to do their work for them.
31 Jul 2018 by Dave Kreskowiak
Whatever language your comfortable with and most appropriate for the type of application you're writing. You're really not going to write a desktop app with Ruby, even though it's possible. Ruby was designed for writing web applications. This is quite a large project for a "college project"....
20 Sep 2016 by David_Wimbley
So you know little about programming but you want to build complicated applications. You've got a lot of work to do, it can be done but it will take you time, a lot of frustration and to be honest...you'll probably give up. That is unless you truly want to learn and be good at programming.So...
21 Jun 2017 by David_Wimbley
I think you would be better off putting the adding/subtracting of your angular variables in your controller rather than your view. You should add another property to your item object...i'll call it sumOfTwoVars. So you should have something like this in your controller (note, you didn't include...
27 Jan 2018 by David_Wimbley
A comment block is pretty straight forward, you need to google "how to add comments in ruby" how to add comments in ruby[^] Ruby Comments[^] If you have something more specific problem feel free to ask it but at the moment, no one here is going to do your homework for you and part of doing...
2 Aug 2014 by debashishPaul
Hi Shuvo, sorry to let you know that there is no programming language that is perfect for all platforms. Every language has its pros and cons. For example, Java is created to work on all platform. The key feature of it is that Java is machine and platform independent. But is it the best? That...
11 Nov 2012 by denghuancong
I do config with this:============================>./configure --prefix=/usr/local --enable-gui=no --without-x --disable-nls --enable-multibyte --with-tlib=ncurses --enable-pythoninterp --enable-rubyinterp --with-ruby-command=/usr/bin/ruby...
18 Mar 2014 by DevAffair
HiI'm trying to click a div in Watir-Webdriver and for some reason couldn't.The website: divChips = browser.element :class => 'chips-area'divChips.element(:css, 'div[chip="5"]').clickand also browser.element(:id, 'roulette').div(:index, 5).clickNothing works.I'd...
19 Mar 2014 by DevAffair
Thanks, for your help. I was told to quit that one and do a different POC.Should be very simple, but again - doesn't work.This should login to a website with Twitter.browser = Watir::Browser.start 'http://www.12mass.com/'browser.link(:class, 'priceLogin').clicksleep...
10 Oct 2012 by Dipali Barapatre
In my rails application, server goes down every time.I got below error in apache log file.Premature end of script headers: [ pid=27202 thr=1 file=ext/apache2/Hooks.cpp:817 time=2012-10-11 05:29:42.409 ]: The backend application (process 5417) did not send a valid HTTP response;...
31 Jul 2018 by DivJ
Python, RubyOn Rails, C/C++ .Which language would be best for building billing software. I want to build a billing software for my college project and maybe I would also try to sell them. I want to add features like stock management and barcode printing also. What I have tried: Just thinking...
19 Nov 2013 by dshey97
I wrote a tic-tac-toe program in ruby. Everything is working except that the game can't end in a tie. Any suggestions?Here is my code:class Game def initialize @board=Array.new @board[1]="1 __|" @board[2]="__" ...
20 Nov 2013 by dshey97
I wrote a tic-tac-toe program. I wrote code so that the user can't overwrite a taken square. It does't let "o" overwrite one of the taken "x" square but for some reason "x" can overwrite a taken "o" square.Here is the if-statement where I wrote this code (let me know if you want the rest of...
19 Jan 2012 by E L N I N O
You can accomplish this if you create a sub report for the list items and include it in your main report.Then handle the SubreportProcessing event and set the datasource for the subreport. Sample code below.ReportViewer1.LocalReport.SubreportProcessing += new...
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!
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!
28 Apr 2011 by e_yasini
When I try to compile rcssserver 3d in windows (visual studio 2010) I get the following errors :------ Build started: Project: ZERO_CHECK, Configuration: Release Win32 ------Build started 4/29/2011 12:31:14 AM.PrepareForBuild: Creating directory...
23 Sep 2013 by Edison Heng
This is a simple introduction about what is Ruby on Rails.
24 Aug 2008 by Eduard Ene
An article on EGen - a scalable code generation and maintenance framework for C/C++/C#/Java, implemented in Ruby.
6 Aug 2014 by ErnestoNet
You are asking the wrong question.You should be asking:- Why do I want to learn a language?- Why do I want to develop software? To make money? To learn? To understand computers? To get reputation? To impress people?- What languages are used where I live? Which one has better...