alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
gordieRab has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
<gordieRab>
Hi anyone. I'm trying to deploy my (first) Ruby app, and it's a pain.. Works fine locally but totally bugs online. Latest problem I get is that error: "Your version of SQLite (3.7.17) is too old. Active Record supports SQLite >= 3.8." - can anyone help ?
<ytti>
i would potentially start with 'how to install sqlite 3.8' query
<ytti>
i feel like you can solve this on your own
<ytti>
but you probably wwant someone to give you exact command lines
<ytti>
which may require more support than most are willing to give
<gordieRab>
HI, thanks. Don't think i'm lazy. I'm just new to Ruby. Thing is, this is on a server i'm renting. I don't have access to run "sudo apt-get install sqlite3 libsqlite3-dev" if this is what you are talking about
TzilTzal has joined #ruby
<TzilTzal>
Hi
dStromboli has joined #ruby
conta has joined #ruby
<pyrmont>
gordieRab: If you don't have the ability to install gems, you're going to have problems. If you can't remedy that, you're better off looking at something like Heroku. You can use their free tier for a while before you'll probably need to pay and at that point you'll have a better idea of whether your app works and is worth the investment.
<gordieRab>
pyrmont : ok. But if I understood well, Heroku stores data to database temporary ? So my data will be erased once in a while ?
fphilipe_ has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
<pyrmont>
I'm having difficulty finding clear wording on Heroku's site but the free plan used to include a PostgreSQL database with 100MB capacity or 10,000 rows, whichever limit you hit first.
<gordieRab>
wow
prestorium has joined #ruby
<gordieRab>
So it isn't erased periodically - which I read before - , maybe they updated things
<gordieRab>
it should fit my need, at least for a start
<pyrmont>
gordieRab: I'm not aware of it ever being erased periodically but I admittedly haven't used Heroku in a long time. Worth maybe exploring their site a little more.
gordieRab has quit [Quit: Ping timeout (120 seconds)]
cnsvc_ has joined #ruby
imadper has quit [Remote host closed the connection]
StoneCypherWork has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
alfiemax has quit [Remote host closed the connection]
StoneCypherWork has quit [Ping timeout: 258 seconds]
alfiemax has joined #ruby
chalkmon1 has joined #ruby
chalkmonster has quit [Ping timeout: 260 seconds]
alfiemax has quit [Remote host closed the connection]
<gordiebill>
but when doing rake db:setup, I got errors
<gordiebill>
fe_sendauth: no password suppliedCouldn't create 'wpsstmapi_dev' database. Please check your configuration.rake aborted!
<gordiebill>
any idea ?
ianbrown78 has joined #ruby
<jhass>
gordiebill: so I guess you're not actually using heroku?
<gordiebill>
i will, but for now i'm on my local machine
<jhass>
and what's that? How did you setup postgres?
<jhass>
can you connect to your local postgres with just "psql"?
<gordiebill>
nope, psql: FATAL: role "gordie" does not exist
ianbrown78 has quit [Ping timeout: 258 seconds]
<jhass>
that's not so bad actually (you should be able to fix it with something like sudo -u postgres createuser gordie)
<jhass>
or make that createuser -s gordie for a local dev setup (creates a superuser)
<jhass>
Oh, I see the database.yml example there specifies no user
<jhass>
so either giving a user (such as the default superuser postgres) or doing the above of creating a user of your login name might actually fix your issue
<gordiebill>
ok, so I could use 'postgres' that's it ?
<jhass>
I mean you never answered my question on what your platform and postgres setup is, so it's just a guess going by the most common setup of postgres
<jhass>
but potentially yes
<gordiebill>
I'm on linux mint
<gordiebill>
I did install postgress through the Gemfile of my ruby on rails app
<lovelove>
But what's up with this? ArgumentError: Could not find or build blob: expected attachable, got #<Tempfile:/tmp/open-uri20200302-48051-14fzryb>
gordiebill has quit [Remote host closed the connection]
<lovelove>
pyrmont: I think so, I thought io was for direct file uploads?
<pyrmont>
I don't have any experience using ActiveStorage but I would have thought that 'open' returns an IO handle that would work the same way for either remote IO or local disk IO.
ianbrown78 has joined #ruby
<pyrmont>
But in any event, the error is saying that it's expecting an Attachable object and it's getting something else instead (in this case, a TempFile object).
<gordiebill>
Hi ! Are files loaded with require_relative() not loaded in a linear way ? I got a bug while including files. See here : https://pastebin.com/vxa8gYaE
<ruby[bot]>
gordiebill: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<pyrmont>
gordiebill: People tend to avoid underscores in class/module names but that's just a convention. I think case is tricker. Because camelcase is often translated into underscores at the boundary of the uppercase letters (i.e. ActiveRecord becomes active_record) then I think there's sometimes a tendency to do things like BbcMixImporter rather than than BBCMixImporter but that's really just a style thing.
g3funk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<gordobill>
config vars ?
<gordobill>
ok, I've got a DATBASE_URL
StoneCypherWork has quit [Ping timeout: 260 seconds]
g3funk has joined #ruby
<gordobill>
kinduff : now what can I do with it ?
DaRock has quit [Read error: Connection reset by peer]
DaRock has joined #ruby
banisterfiend has joined #ruby
TCZ has joined #ruby
DaRock has quit [Read error: Connection reset by peer]
DaRock has joined #ruby
StoneCypherWork has joined #ruby
<kinduff>
Your app should be running as expected, is your app down or something?
caterfxo has joined #ruby
DaRock has quit [Read error: Connection reset by peer]
TCZ has quit [Quit: Leaving]
DaRock has joined #ruby
StoneCypherWork has quit [Ping timeout: 256 seconds]
fphilipe_ has quit [Read error: Connection reset by peer]
fphilipe_ has joined #ruby
<gordobill>
no, I don't think so, how could I check ? But my api has to fetch a row in the database and it seems that it doesn't get it, while it does exist (I checked with pg_web)
DaRock has quit [Read error: Connection reset by peer]
DaRock has joined #ruby
<gordobill>
it's not down since another endpoint of my api works
StoneCypherWork has joined #ruby
Azure has quit [Ping timeout: 256 seconds]
<kinduff>
How are you connecting through pg_web?
StoneCypherWork has quit [Ping timeout: 240 seconds]
Bounga has joined #ruby
DaRock has quit [Read error: Connection reset by peer]
DaRock has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<gordobill>
kinduff : like this : heroku config:get DATABASE_URL | xargs pgweb --url
fphilipe_ has quit [Ping timeout: 255 seconds]
g3funk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DaRock has quit [Read error: Connection reset by peer]
DaRock has joined #ruby
<kinduff>
Can you post me your database.yml and the output of heroku log whenever you try to query the record you want?
fphilipe_ has joined #ruby
Azure has joined #ruby
fphilipe_ has quit [Ping timeout: 255 seconds]
impermanence has joined #ruby
ianbrown78 has joined #ruby
jcalla has joined #ruby
ianbrown78 has quit [Ping timeout: 240 seconds]
SeepingN has joined #ruby
weird_error has joined #ruby
duderonomy has joined #ruby
fphilipe_ has joined #ruby
cnsvc_ has joined #ruby
mokha has quit [Remote host closed the connection]
StoneCypherWork has joined #ruby
mokha has joined #ruby
banisterfiend has joined #ruby
banisterfiend has quit [Ping timeout: 256 seconds]
olddogbarks has joined #ruby
g3funk has joined #ruby
nofxx_ has joined #ruby
nofxx has quit [Ping timeout: 272 seconds]
infinityfye has quit [Quit: Leaving]
DaRock has quit [Ping timeout: 240 seconds]
olddogbarks has quit [Quit: ZZZzzz…]
olddogbarks has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
cassidy34 has joined #ruby
g3funk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
olddogbarks has quit [Quit: ZZZzzz…]
<skywalker>
hey guys. i have a noob question. there this gem, and i see ~6 development dependencies. i am packing that gem to rpm. how can i make sure i need to package those gems as well? i mean, they're development dependencies and i am struggling to understand if that means they are required in order to *use* that gem
<skywalker>
would you help me clarifying this?
<pyrmont>
No, they're not required. They won't be installed by gem program if you just require the gem.
<pyrmont>
*the gem program
pupsikov has joined #ruby
<pyrmont>
They will be installed if you check the code out (I presume it's on GitHub) and then run bundle install from the root directory of the code.
<skywalker>
right, so in that case, i don't need to package the other gems. if they were "runtime dependencies" i would then. correct? (seems obvious just making sure, though)
<pyrmont>
I'm not familiar with how the packaging you're talking about works but if dependencies are runtime then they will be installed by the gem program.
StoneCypherWork has quit [Ping timeout: 260 seconds]
cassidy34 has quit [Remote host closed the connection]
impermanence has quit [Remote host closed the connection]
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
duderonomy has quit [Read error: Connection reset by peer]
duderonomy has joined #ruby
hiroaki_ has joined #ruby
sam808080 has joined #ruby
mre- has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
smoochsmooch has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
chalkmonster has quit [Quit: WeeChat 2.7.1]
jenrzzz has joined #ruby
leitz has joined #ruby
mre- has quit [Ping timeout: 258 seconds]
sam808080 has quit [Ping timeout: 260 seconds]
sam808080 has joined #ruby
<phaul_>
&renick
<rubydoc>
okay
rubydoc_ is now known as rubydoc
mre- has joined #ruby
g3funk has joined #ruby
ianbrown78 has joined #ruby
burningserenity has quit [Read error: Connection reset by peer]
<skywalker>
hey guys. i am running rspec spec, in a gem's source and apparently rspec is not looking for the gems i have installed, because i am seeing things like "Could not find gem 'rake (~> 10.0)'", but i have rake (12.3.2) installed, for example.
<skywalker>
is it an obvious mistake?
soulisson_ has joined #ruby
mre- has quit [Ping timeout: 255 seconds]
sam808080 has quit [Ping timeout: 255 seconds]
burningserenity has joined #ruby
<phaul_>
skywalker: is it with bundler? ie Gemfile and did you install with bundle install?
<skywalker>
i did not install with bundle install, and it seems that yes, bundler is complaining.
<phaul_>
what happens with bundle exec rake?
jmcgnh has quit [Read error: Connection reset by peer]
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
<skywalker>
i've noted that if i comment/remove the "spec.add_development_dependency" dependencies gemspec and the ones inside the Gemfile, the tests run, no failures
<skywalker>
phaul_: it's a redhat system, i cannot use gem to install gems, only dnf/yum (rubygems-gemname)
soulisson has quit [Ping timeout: 256 seconds]
<skywalker>
by i cannot, i mean, i should not, because i don't want to mix gems installed by dnf with ones from gem. and all the gems i need are on fedora/redhat's repository
burningserenity has quit [Client Quit]
<phaul_>
ok, I'm not familiar with that system.. sorry..
jmcgnh has joined #ruby
<skywalker>
np, phaul_
sam808080 has joined #ruby
mre- has joined #ruby
Tempesta has quit [Quit: See ya!]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mre- has quit [Ping timeout: 256 seconds]
sam808080 has quit [Ping timeout: 256 seconds]
g3funk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
olddogbarks has quit [Quit: ZZZzzz…]
<leitz>
skywalker, could the ~> 10.0 be a mistake, and it's not recognizing a newer gem? What RH are you running?
g3funk has joined #ruby
Ai9zO5AP has quit [Ping timeout: 256 seconds]
olddogbarks has joined #ruby
<skywalker>
leitz, i see, i've just tested on a fedora 31 fully updated. i had the same issue
edward69 has joined #ruby
<edward69>
hi
<edward69>
Please. How to create an associative array in Ruby ?
<havenwood>
edward69: hi
<edward69>
not an hash table
<havenwood>
edward69: We use a dictionary called a "Hash" instead of associative arrays.
<ewanchic>
I know this has nothing to do with ruby, but wondering about computer HW with the whole economic slowdown due to the coronavirus:
<ewanchic>
I've heard that if your thinking about building a computer, one should build one now. I've had my i7 with 32GB for 8 years now. I like it. the only thing I need now is more RAM. staying with 1151 CPU series only gets me up to 64GB. However, if I move to a 2066, I could upgrade to 256GB RAM in the future if I need it.
<ewanchic>
Any opinions? Any foreseeable trend in Ruby, Rails, programming, etc that might help sway my decision in purchasing HW within the next week or two? Thanks!
<ewanchic>
crewed.
<ewanchic>
I'm struggling because I really don't have a budget for either. Yet, with my system being 8+ years old, I could be in trouble with my Bread and Butter work. But I could invest and still be in trouble because sometimes new HW can be a pain too (breaking down, not reliable etc). Yet, waiting could be just as bad because of the whole slowdown in parts could drive up prices in a few more weeks and months. So when I really need something, I'm s
<havenwood>
ewanchic: Ruby's multi-core story gets nicer with the advent of Isolates in Ruby 3.0—maybe as early as this Christmas.
<havenwood>
ewanchic: The hope is to keep Ruby memory use very low, even with the JIT, but the JIT evolving does suggest more memory being useful.
<ewanchic>
havenwood: tell me more about that. isolate gem?
<havenwood>
ewanchic: Isolates actually mean less memory than a multi-process setup. :) Sec, let me find Ioquatix's update.
Fernando-Basso has quit [Quit: Leaving]
<apotheon>
I'm making do just fine with a 2016 laptop maxed out at 20GB RAM.
<havenwood>
I'm still waiting on my 16" MBP update. This keyboard....
<ewanchic>
havenwood: Ok. When this I just learned this morning was that there is no more hypertheading in the i7s. so I have a 4core i7, which is 8 in hypertheading. i9s have hyperthreading which the cheapest 2066 cpu has 10 cores with 20 threads, not sure how many virtual cores or if that's even a thing any more.
<leitz>
skywalker, I'm not sure what's going on with your gem issue. Unless the LOAD_PATH is messes up.
<leitz>
skywalker, if you run an irb session, can you "require 'rake'" and get "true"?
<apotheon>
My vague memory of Fedora's Ruby support is that it's . . . let's say it's "idiosyncratic", or "quirky", or something like that.
<apotheon>
(re: skywalker et al.)
soulisson_ has quit [Quit: Leaving]
<ewanchic>
leitz: I do have a server. My son filled it up with video (and I mean legit video for his youtube projects, editing. He works on cars). So my non-techie wife suggested...are you doing backups of your computer? And she had a point. So I'm looking at another 8TB, 10Tb, or 12TB raid to backup and cycle out older HDDs. thats another $400-600. Which means I'd need to but my workstation upgrade on hold for a while longer.
sam808080 has joined #ruby
cd has joined #ruby
mre- has joined #ruby
<leitz>
apotheon, on RH/Fedora boxes I build my own ruby.
<leitz>
ewanchic, I'm jealous! It's very difficult to find a decent mechanic that's honest.
<leitz>
ewanchic, the reality my budget made me face is "what are you actually doing?" I use a $30 enclosure and a 1 or 2 TB drive over USB. Weekly rsync to those drives, and most of my code and fiction is in git.
<leitz>
ewanchic, once in a while I upload to Google Drive, 100 GB for $20 a year. Maybe your mechanic son can pitch in for drive space? :)
<havenwood>
Rails runs really well on my phone. ¯\_(ツ)_/¯ It's great we have such tiny hardware now.
<ewanchic>
leitz: I hear you. I typically have done all the mechanic work myself, but it gets to a point that coding and auto work takes time, and only one pays the bills. Hmm, I've never really considered a USB rsync, I've always rsynced to my server. But, That is something I should think about. Perhaps I need to RAID 1 my computer. Hmm, thanks for giving me more to consider; perhaps I am aiming too high.
<ewanchic>
havenwood: Thanks for the article. You mean a rails server on your phone? what kind of phone are you using?
kristian_on_linu has quit [Remote host closed the connection]
<ewanchic>
havenwood: I have an Samsung, S9, Android. I didn't know this was even possible. How are you doing that?
<havenwood>
ewanchic: Yup, `rails s` style. A Pixel 3.
<leitz>
ewanchic I don't RAID at all, if you screw up the file, it get's RAID'd. I used to run NetBSD on Sparc, and could rsync between the drives, and boot off either one. I use Ansible to configure my nodes, back up /home to an external drive, and keep important stuff in GitHub.
<apotheon>
leitz: I'm talking about the gems more than the Ruby executable itself.
<havenwood>
ewanchic: Just grab a terminal emulator and you should be good to go.
<apotheon>
gems in the package system, that is
sh7d has quit [Quit: meh]
<havenwood>
ewanchic: It even works over a local network. It's a fun way to show off your app.
sh7d has joined #ruby
<ewanchic>
havenwood: WOW! It's just something I never thought of doing. I just assumed Android was a Java only world. Is there another piratical reason to that on the phone as apposed to over a public network, beside being just local and there when you need it?
<ewanchic>
'practical reason'
<havenwood>
ewanchic: I had solar power Edisons serving up daytime only Phoenix app, which I thought was funny.
<havenwood>
ewanchic: No, I've only done it for impractical reasons.
<leitz>
apotheon, understood. The only reason to use Fedora/RH ruby is to install Ruby, which needs to be on the machine to build Ruby. After that, it's just build Ruby and then use the build "gem" to install stuff.
<skywalker>
leitz: yes, it returns true
sh7d has quit [Client Quit]
jmcgnh has quit [Read error: Connection reset by peer]
sh7d has joined #ruby
<leitz>
skywalker, then your system can find rake. Unless there's another "rake" there, I'm not sure what's going on.
<ewanchic>
RubyMotion!?! I've never heard of this.
ellcs has quit [Ping timeout: 240 seconds]
jmcgnh has joined #ruby
<ewanchic>
Hey, thanks everyone for giving me some more to think about!
lucasb has quit [Quit: Connection closed for inactivity]
NODE has quit [Quit: changing servers]
troulouliou_dev has quit [Quit: Leaving]
NODE has joined #ruby
<leitz>
It looks like RubyMotion provides an encapsulated Ruby with "your" app? Anything that does that for Linux/Mac/Winderz?
markopasha has quit [Remote host closed the connection]
weird_error has quit [Quit: weird_error]
<adam12>
leitz: DragonRuby but it's somewhat game oriented currently.
<adam12>
leitz: If you're not opposed to Java startup time you can distribute Ruby in a JRuby JAR file too.