All Questions
245
questions
0
votes
1
answer
30
views
Prevent Rails console from removing consecutive linebreaks
I'd like to prevent the Rails console from removing consecutive linebreaks:
CoolApp (PRODUCTION) > a = '
CoolApp (PRODUCTION) " hi
CoolApp (PRODUCTION) "
CoolApp (PRODUCTION) "
...
0
votes
0
answers
297
views
Problem with ruby on rails - unknown keyword autoload_paths_cache (ArgumentError)
I installed Ruby v.2.6.10 and run bundle install in my app folder - it worked. Now when I want to run for example rails server it throws:
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.16.0/lib/...
0
votes
0
answers
90
views
Job control in Ruby - SIGCONT handlers not working, SIGTSTP handler working only for irb. What am I missing?
I was working on trying to implement some kind of shell job control for a custom event loop handler with the GLib2 API in Ruby-GNOME. Ideally, this would be able to handle SIGTSTP and SIGCONT signals, ...
1
vote
0
answers
45
views
How to create live changing text in ruby?
How to live changing in ruby, I receive API but it looks like:
the number is 1
the number is 2
the number is 3
it's normal because inside the loop and when I use cls on windows or clear on Debian, it ...
0
votes
1
answer
351
views
How can I list devise users in a ruby on rails project using the console?
I have a ruby on rails project, and I am using devise for user authentication. Is there any way for me to check for the existence of an account by email using the rails console? If not-- is there a ...
2
votes
2
answers
3k
views
How to manually set ENV variables when running rails console
Is there a way to pass in env variables when running rails console? I have a rails app running on a server and when I try to ssh in and run rails console for debugging it says it is missing the master ...
1
vote
2
answers
712
views
Ruby console - Multiline command with exit
I have a simple ruby script I would like to run in the rails console, using bundle exec rails c
ids = [1, 2]
if ids.length() > 5
puts "More than 5 ids, quitting"
exit
end
ids....
0
votes
0
answers
89
views
Mix input/output with Ruby IO?
I am hoping to write a small method that can interact with a subprocess (bash in this case) and should be able to both write commands and have those commands print their outback back to my shell when ...
2
votes
0
answers
105
views
Is there a more efficient way to control the console cursor(carriage position and so on) using Ruby?
In a text based game that I'm making with Ruby, I wanted to have multiple colors on a single line of text. The paint gem would only seem to work with two colors but I wanted more, so I looked up those ...
0
votes
0
answers
51
views
Creating a console based text game and can't get the cursor to pop up a line into the proper location (Ruby)
Edit: using the Paint gem.
So I'm re-writing the shop system in my text based game I made in ruby. I'm attempting to get multiple colors onto a single line of text. I found a method that works but for ...
3
votes
3
answers
845
views
Rails "noticed gem" saying uninitialized constant
I am trying to get notifications to work in my app. I found "noticed gem" from this GitHub repo and followed all the steps that he does. I have the gem in my gem file, I did bundle install ...
0
votes
3
answers
16k
views
Error with ruby version on termux when I try to install metasploit
I was installing metasploit with termux and it said:
termux output
~ $ ls <br>
metasploit-framework storage wiki-termux<br>
~ $ cd metasploit-framework<br>
~/metasploit-framework $ ...
0
votes
1
answer
204
views
How to raise Rails console as underprivileged www-data user?
My Rails app runs with nginx's www-data user and all disk write functions are owned by www-data and so all the app's related disk stored assets are owned by www-data. Sometimes I need to raise the ...
0
votes
0
answers
109
views
My ruby calculator won't output to my console
So I'm using atom to code up a calculator and I can't seem to get the console to output the first instance of puts. It just says [Finished in 2.88s]. Is there anything missing that's causing my code ...
0
votes
0
answers
152
views
Rails Console is not querying the table in Rails 6
Altruists,
I am new in Rails, I have a devise user model named Account. I have signed up with my email, and I want to query my Account table from rails console, like I did in Rails 5 without any ...