top contributors since
ruiwenge2
HazTheWaz
thesephist
jajoosam
mat1
HackermonDev
eankeen
TrueXPixels
HarperframeInc
potatojs
view leaderboard →
h
1 year ago
Wildest programming language ideaWhat is your wildest programming language idea? This could be fun (silly) ideas or really cool and useful ones. Go! Also on le twatter: https://twit...
Ask
807 comments
Latest comments
awesomecds76 days ago
how about this : a code that uses WORDS (simalar to LOLCODE) but only words lol Screenshot 2021-09-14 8.43.14 AM
HayIsForHorses7 days ago
Not too crazy, but what if you had opposite syntaxes? I'm gonna leave the replies to give some examples, but here's a short one: "hello" = world print("hello") // Output: world while i < 11: i-=1 //this would add i+1 until its greater than 11 EDIT: Found a slightly crazier idea....have to use morse code to type everything.
LordPython40413 days ago
try leet... \/4R x = "7#15 15 50/|\3 73x7" \/4R '/ = SO 1f '/ >= SO { |*R1|\|7{x}; } This is the same as: var x = "This is some text" var Y = 50 if Y >= 50 { print{x} }
view all ›
h
3 years ago
Guide to Asking Coding Questions# **Guide to Asking Coding Questions** ## **Why?** Good questions help your question be solved faster, and people will want to answer your questio...
Ask
177 comments
Latest comments
MikeW32 months ago
repl.it/feedback and repl.it/bugs are broken links
[deleted]
3 months ago
Is stackoverflow useful?
P0GCHAMPB0i3 months ago
What if I acidently delete my account that has important stuff?
view all ›
answered
1 year ago
How do I add a package to a Ruby repl?I am unable to get packages installed in a Ruby repl. Here are the reproduction steps: * Click on 'new repl' * Choose 'Ruby' for the language * Click...
AskRubyRuby
1 comment
Latest comments
SixBeeps1 year ago
If you can get it to run in console, try making a .replit file
view all ›
2 years ago
Saving ProgramIn the introduction to programming, one of the first steps is to "save your program as first_program.rb". I do not, however, see any options to save a...
AskRubyRuby
4 comments
Latest comments
vedprad12 years ago
Repl.it automatically saves your file as main.rb, so you do not need to worry about that. Unfortunately, you cannot change the name to firstprogram.rb. This is because repl.it has to run the file, not you. In real life, you would right ruby firstprogram.rb into the console, but you cannot do that on repl.it. That's why you can only run the file called main.rb. There is one advantage to this, though. Instead of dealing with the command line, you just have to click run. You have to pay this cos
the program is already saved automatically, and you can rename your repl by clicking on the pencil icon next to the repl name in the top-left hand corner
view all ›
answered
2 years ago
What's going wrong?????ok homies so i made this thingy called math tutor as you all know, and it's supposed to solve math problems to make life easier for me, but it's gone...
AskRubyRuby
6 comments
Latest comments
blonkm2 years ago
Your inputs are strings (text). Text cannot do math. You need to convert the input to numbers using float() or int(). see https://www.includehelp.com/python/read-input-as-a-float.aspx
As a word of advice, you can just do gets.chomp without the !. Otherwise it seems fine
Grify2 years ago
I'm not getting an error so I need more info on what the problem is in order to help you
view all ›
1 year ago
trouble installing ruby gemsI'm having trouble installing ruby gems. The example on the repl/ruby_gems page also appears to be broken. Any word on when this will be fixed? https...
AskRubyRuby
5 comments
Latest comments
Shad0w2k26 months ago
Hey everyone! So I found this was a simple 2 step process. If this is what's intended maybe the help docks may need a bit-o-dusting off. Step 1. In your packages install the gem you want to use. In my case it was bcrypt. Step 2. In your .replit file for your run use "run="bundle exec ruby YourRubyFile.rb" Thats all I had to do. Just use the standard require 'bcrypt' at the top of your script and go! I hope this helps. Working Example: https://replit.com/join/zumtouac-shad0w2k2
markshaw41 year ago
I'm having same issue, strangely it works if it's a Sinatra project, just not a Ruby project.
PattanAhmed1 year ago
@KyleSchulz Hi, You can install a gem using gem install [gem] Then you can local-search through all your installed gems. *Hope this helps Please mark my answer if this helps*
view all ›
1 year ago
Package Installation failing on SASSCI'm getting an error with a Ruby Repl when I try to install the `jekyll` package. (See output text below) Are there known problems with Jekyll, Ruby...
AskRubyRuby
9 comments
Latest comments
PattanAhmed1 year ago
@ceilingrat Hi, It's working fine for me... Try this method:- Go to Packages 01 Search in the search bar 02 Type jeky and select the Jekyll package 03 Remove and Install again. 04 01 I am not sure that this may work or not. For me, it's working without any errors. Regarding this website link , You cannot trust that answer because it is without any evidence. So, Leave that matter. That's it I can help you Thanks! Hope this helps
ceilingrat1 year ago
This StackOverflow link seems to indicate that the Repl is running out of RAM.
view all ›
1 year ago
Why does the text not display properly![textdisplay](https://storage.googleapis.com/replit/images/1596725476397_4a4a5c02087466013a3f237b92972ff7.png) I am using google Chrome on Debian 10...
AskRubyRuby
6 comments
Latest comments
Coder1001 year ago
Hi! This is a bug with repl.it's terminal. Report it here. Be sure to also send in what browser and OS you are using and the repl url.
PattanAhmed1 year ago
@zleap Hi Paul, You have 2 ways now. You can try by closing the tab or window and open it again and refresh Check your code again to make sure that there is not any kind of silly mistake you have done! That's it. **Hope this helps Please mark my answer if this helps**
ironblockhd1 year ago
This is a display bug, simply close the tab and open it again
view all ›
1 month ago
How do I create new files?If I deleted the main.rb file and try creating new files I get an error message which states something like main.rb is not found.
AskRubyRuby
6 comments
Latest comments
Coder1001 month ago
Replit only runs main.rb. You will have to configure the run button to run something other than main.rb: https://docs.replit.com/programming-ide/configuring-run-button#configuring-the-run-button
FloCal351 month ago
Use the history icon by the name in the top left and scroll down to before you deleted it
view all ›
2 years ago
not running my programI have a problem, when I'm going to run a program with a name other than "main.rb" it doesn't run, it only runs "main.rb" as I do to run the program I...
AskRubyRuby
1 comment
Latest comments
PixelNinja2 years ago
It will always run the main file. try putting code in there or add a line to main that runs other files. Hope this helps
view all ›
2 years ago
serverHello, So I was wondering how can I make this ruby on rails project folder into a server so I can connect to the front-end like for example codepen.io...
AskRubyRuby
1 comment
Latest comments
a5rocks2 years ago
What exactly do you mean? Do you mean added HTML? If so I would check out the Views / Templates in http://sinatrarb.com/intro.html If I completely misinterpreted your question, sorry xD
view all ›
answered
7 months ago
Cannot run my main.rb anymoreI was practicing ruby this afternoon, and then it suddenly showed the error message below. Now I cannot Run my main.rb anymore. Can anyone help me fix...
AskRubyRuby
8 comments
Latest comments
Zavexeon7 months ago
It looks like that package you are trying to install was built using a higher version (2.5.8), while repl.it currently uses 2.5.5. Maybe that is in relation to the issue.
Coder1007 months ago
Yeah, repl.it's package manager for ruby does not work very well at all. Report to bugs: https://repl.it/bugs
BananaJellyfish7 months ago
well, it says that 'cal' is undefined, where did you get 'cal' for the cal.rb from
view all ›
answered
1 year ago
How to save console output/view previous runs.Hi all, I'm new to Repl and to coding. I just created a MadLib program which I've had several friends run on my computer. Usually I clear the console...
AskRubyRuby
11 comments
Latest comments
CodeLongAndPros1 year ago
For me, you can scroll up, but you could put this in a file named .replit: run='{run commmand} >> replit.log' `
Roar1231 year ago
I think if you don't clear explicitly, the repl console doesn't clear the results of the last program, but simply moves the cursor down. If you want to save your own stories, write them to a text file or possibly store the variables in a json.
view all ›
3 years ago
Blue the Chatbot (in progress)It would be awesome if you guys could test this out for me and give me some suggestions.
AskRubyRuby
2 comments
Latest comments
21natzil3 years ago
Because your responses are the same for some messages, I'd suggest having lists of the same types of message ("Hi", "hello", etc), then check if the message was in the list, and respond. I'm not great with ruby, but in python it would be reply = "Hi" greetings = ["Hello", "Hi", "hey"] if reply in greetings: print("Hello. How are you today?") This makes the code DRY (Don't repeat yourself), a very important concept in computer science.
JoshDaBosh3 years ago
pretty good, but the hardcoding is unadvisable and code is a bit unreadable ngl
view all ›
answered
4 months ago
How to access backend vars on the frontend in RubyHow would I access the visitor's var in my index.html file?
AskRubyRuby
4 comments
Latest comments
CodingCactus4 months ago
you should use erb files, not html ones A little example: main.rb get "/" do @randnum = rand(1..10) erb :index end public/index.erb If you need some explanation, let me know!
view all ›
2 years ago
Problems with file IO and all that garbage in rubyMy program can add to the file, but it refuses to return anything. Help would be appreciated.
AskRubyRuby
7 comments
Latest comments
WilliamPenrod2 years ago
I don't know ruby all that much, but from looking at your code you forgot to call your def > If(this.equals("answered your question")){ this.marksastheanswer}
what are you wanting to return?
view all ›
1 year ago
can i use irb? how can i use it?require 'open-uri' open('https://www.nytimes.com') i try to open this url. but nothing happens. only errors
AskRubyRuby
6 comments
Latest comments
SixBeeps1 year ago
Works for me? image
view all ›
10 months ago
timeris there by any chance a way to add a timer to your repl?
AskRubyRuby
5 comments
Latest comments
maxina9 months ago
In python, you can use the time function, I know Ruby is very similar to python, so there probably is some kind of time module in Ruby. Here's how it is done: import time for i in reversed(range(1, 10)): print(i) time.sleep(1) Oh here I found a time module for Ruby: https://ruby-doc.org/core-2.6.3/Time.html
RYANTADIPARTHI10 months ago
Do you want a timer in your code?
AloegelhiPlaysR10 months ago
Make a file named 'timer.js' and put the following code: let timer = seconds // Replace 'seconds' with the amount of SECONDS. setInterval(function() { timer -= 1 let newTime = timer console.log(newTime) }, 1000)
view all ›
answered
1 year ago
Is there any problems?i submited this code to my teacher, but he said it's not okay.. The Problem is making the code to discern input value is prime num or not prime num....
AskRubyRuby
6 comments
Latest comments
DynamicSquid1 year ago
What are you trying to do?
view all ›
2 years ago
adding one to a numberHey there! I have been trying to do the below exercise but keep on getting stuck. I can't figure out how to have the program add one to the number......
AskRubyRuby
6 comments
Latest comments
bossotron132 years ago
Remove line 4 and replace line 5 with this var2 = number + 1 `
view all ›
4 months ago
What is this?If I generate a big pyramid this weird question mark thing replaces some of the blocks (�). Why is this happening?
AskRubyRuby
3 comments
Latest comments
ruiwenge24 months ago
I don’t know what it is but I do know the question mark appears sometimes to me as well
view all ›
10 months ago
[JS] How to show all keys with their values?Even though the repl it RubyLearning, ignore the name or the language or even the code, the repl is on a team so I can't directly link it. Here is th...
AskRubyRuby
4 comments
Latest comments
Coder10010 months ago
well, assuming you have the client, I made a getAll method specifically for that. db.getAll().then(console.log); `
programmeruser10 months ago
const fetch = require('node-fetch'); async function getAllKeys() { const res = await fetch(process.env.REPLITDBURL + '?prefix='; return await res.text(); } (note: haven't tested this)
view all ›
h
2 months ago
Problem using 'net/http' on ruby 2.50 -- can I upgrade ruby version?I have the following error: ``` from /usr/lib/ruby/2.5.0/net/http/request.rb:15:in `initialize' /usr/lib/ruby/2.5.0/net/http/generic_request.rb:20:in...
AskRubyRuby
2 comments
Latest comments
SixBeeps2 months ago
Nix has a variety of Ruby packages across various versions if you're willing to take a few minutes to learn it. Just set up a Nix Repl, install the Ruby compiler you want to use, then run a Ruby script through the console. Quick video walkthrough: https://www.youtube.com/watch?v=gItKAtedmq4
view all ›
answered
h
2 years ago
Clearing Console in Ruby.As the title implies I want to know how to clear the console in ruby, I've attempted everything on this page : [Stackoverflow](https://stackoverflow.c...
AskRubyRuby
4 comments
Latest comments
try doing print "\e[2J\e[H"
view all ›
answered
1 year ago
Can't find gem with executableI'm trying to run the [Wayback Machine Downloader](https://github.com/hartator/wayback-machine-downloader) Ruby script, and I ran into this problem wh...
AskRubyRuby
3 comments
Latest comments
Coder1001 year ago
Me too :( I couldn't get the ruby http module :( Report this to bugs and hopefully the repl.it team can get an actually working package manager!
view all ›
h
4 months ago
I get a run main.rb file not found....but I deleted it why does it occur?I deleted main.rb But now I get errors when I press the run button. I just want to run a specific ruby script. Why does this happen? Thanks
AskRubyRuby
2 comments
Latest comments
CodingCactus4 months ago
If you want to run a file other than main.rb, you should look into using a .replit file https://docs.replit.com/repls/dot-replit basically make a file called .replit and write: run="ruby filename.rb" language="ruby" `
Wumi44 months ago
The reason is because by default, Ruby Repls always runs main.rb. The file is basically an entry point. If you want to run it, then go to Shell tab, then type: ruby `
view all ›
4 months ago
Whats wrong?(how change version ruby in this application?On video education alright on this app don’t work(
AskRubyRuby
2 comments
Latest comments
FITMAN4 months ago
Thanks a I’m try)
InvisibleOne4 months ago
You are telling it to continue the loop up to n but n doesn't exist yet, try giving n a value n = 10 or something.
view all ›
1 year ago
private & shareHello, I would need help and response regarding my repl account. I would like that people have access to this link: https://test-ip.zorm.repl.run/ to...
AskRubyRuby
3 comments
Latest comments
SixBeeps1 year ago
Well yeah if it's private, then it's locked away from everyone except for when you're editing it. If you make the Repl public, you can give them that URL and they won't see the code.
view all ›
5 months ago
Ruby error.I am making this small game. If you play for a while, you might notice this error popping up in the console. How do I fix it, if it even is fixable?
AskRubyRuby
2 comments
Latest comments
Coder1005 months ago
please be more specific with the error so you can get help faster.
view all ›
1 year ago
how can I check each factor of number 20 and return all the prime number i wanted to iterate through all numbers in 20 and return the prime number s only,
AskRubyRuby
3 comments
Latest comments
Highwayman1 year ago
You could make a nested for loop that checks for divisibility by all the numbers (excluding 1 of course) less than the current number. So like loop 20 as x loop x as y if x is divisible by y then it’s not prime. ~
view all ›
2 years ago
What do i do?I am new and i can't figure out what to do?This my first time doing this because,I recently finished a course in year 8
AskRubyRuby
3 comments
Latest comments
bhuya0102112 years ago
my goal is to creat a programe about anything
What is the assignment/goal?
HackermonDev2 years ago
You can't figure what out? The code runs fine.
view all ›
11 months ago