JMoir

Activity Graph

Page 1 of 1

2015-07-14

[06:41:22] JMoir: has joined #ruby
[07:12:11] JMoir: Why is deploying a sinatra app so hard on nginx + passenger? I've tried every tutorial on the first page of google search and none will work, all I get is welcome to nginx! Does anyone know of a good walkthrough for doing this?
[07:13:33] JMoir: Really, why? I even followed the passenger tutorial xD
[07:14:38] JMoir: OK, thanks, I'll give that a go.
[08:42:20] JMoir: Well puma is getting me further deploying my sinatra app than before! When I try and load it, it just loads for ages then throws a 504 at me though...
[08:42:46] JMoir: I'll be happy once I've cracked deployment :L
[08:43:11] JMoir: yorickpeterse: morning
[09:08:30] JMoir: shevy: cats?
[09:19:44] JMoir: shevy: Oh, haha xD
[09:20:01] JMoir: This cat is an absolute pain
[09:20:17] JMoir: It does nothing, much like other cats to be honest.
[10:57:15] JMoir: FINALLY got puma to work xD That was waaaay too much trouble.
[10:57:51] JMoir: Haha \o/ I like that
[10:59:17] JMoir: Does anyone know of a good gem to add [img](etc) codes to posts? What is that feature even called?
[10:59:40] JMoir: I keep trying to use vim commands to edit my messages >.<
[11:00:03] JMoir: ljarvis: Thanks (Y)
[14:08:37] JMoir: Does anyone know of any good resources to learn about testing; what to test, how to test, practices and stuff? I'm really bad at testing, I'm writing my first proper app in ruby and realised I have two tests despite having a functioning site... Oops
[14:16:12] JMoir: Coraline: I just read the description and this looks great! In my past searches all that I had found was how to do basic tests on an application with about 10 lines of code. I wanted more theory and practices so I can apply them to bigger projects well. This looks good, thanks.
[14:18:26] JMoir: konsolebox: I'll definitely have to get it then, it looks like quite a few people say it's a good book
[17:28:46] JMoir: Finally got my first proper project up to a point where I can use it for what it was made for (a blog for my family and friends as I'm off to Japan for a year tomorrow). It's a good feeling!
[17:29:07] JMoir: Needs some major refactoring, but first I should write tests...
[17:38:49] JMoir: havenwood: Cheers :)
[17:39:05] JMoir: shevy: Yes, planning on going to rubykaigi and other events like it :)
[17:39:28] JMoir: havenwood: I haven't heard of it, but if time allows, I'd love to go
[17:40:36] JMoir: havenwood: https://asakusarb.doorkeeper.jp/ this? Every Tuesday? I'd be stupid not to go!
[17:41:08] JMoir: I'm looking forward to going to a ruby meetup, there are none where I live
[17:43:33] JMoir: dfockler: Damn..
[17:43:38] JMoir: Right I have to go bye
[20:43:06] JMoir: Remote host closed the connection

2015-07-13

[12:14:51] JMoir: has joined #ruby
[12:59:48] JMoir: Does anyone know what I can't acces the sinatra session variable here? https://gist.github.com/jamalmoir/c3384a264fbdb2bb9ee7 I can access it fine in my routes file...
[13:10:51] JMoir: Apparently sinatra can only see the session object within a request, is there anyway to get around this and pass it to a function?
[13:12:07] JMoir: Outside of requests it throws out an error saying session is undefined
[13:12:53] JMoir: outside of a get/post etc
[13:13:22] JMoir: https://gist.github.com/jamalmoir/c3384a264fbdb2bb9ee7 this is what I'm trying to do
[13:17:59] JMoir: jhass: Sigh, I see. Thanks anyway
[14:30:45] JMoir: I'm reading some code and I came across this: @now = session || Hash.new Am I right in thinking that this line sets @now to session if it is set, but if it is nil or false, it creates a new Hash?
[14:31:46] JMoir: ljarvis: Thank you! I just wanted to check, I've never seen it before
[23:49:01] JMoir: Ping timeout: 264 seconds

2015-07-12

[09:19:54] JMoir: has joined #ruby
[20:37:10] JMoir: Hey I'm getting a Boot error LoadError: cannot load such file -- sinatra/flash, can someone help please? I've installed all the gems, they are in my Gemfile... I can't figure it out https://gist.github.com/jamalmoir/3bc5b7d50b5acb7f14a4
[20:38:07] JMoir: Sorry I retyped it into the gist, that's a mistake, it's correct in the Gemfile
[20:38:45] JMoir: yes I ran the bundle install, what do you mean adaedra?
[20:39:56] JMoir: I just get redirected to a page with that error on when I try to load the site. I haven't done anything with the gem yet
[20:41:15] JMoir: and shotgun
[20:41:27] JMoir: It's just running off my laptop
[20:41:38] JMoir: no I'll try that now
[20:45:33] JMoir: rackup won't even start, updated gist with error https://gist.github.com/jamalmoir/3bc5b7d50b5acb7f14a4
[20:49:18] JMoir: sinatra (1.4.6) ???
[20:49:20] JMoir: sinatra-base (1.4.0, 1.0)
[20:52:40] JMoir: oh right, ok. Thanks, I'll try that
[20:57:40] JMoir: Thanks, rackup boots up now! Shotgun is still broken and can't find the file though. Is that normal for shotgun to do this?
[21:32:45] JMoir: havenwood: It's in this gist, it broke when I added Sinatra::Flash https://gist.github.com/jamalmoir/3bc5b7d50b5acb7f14a4
[21:35:24] JMoir: Ahm OK... I should really check that before I start using it, shouldn't I? Haha, oh well.
[21:35:56] JMoir: Well, that's a good lesson to learn xD
[21:36:50] JMoir: No, I found it in a google search and just went for it, my mistake
[21:39:40] JMoir: Thanks, I'll take a look. I'm still trying to get used to ruby and it's gems haha. I've never really used libraries in the same way before.
[22:48:39] JMoir: Ping timeout: 250 seconds

2015-07-11

[09:45:53] JMoir: has joined #ruby
[09:47:47] JMoir: Hey, for some reason this code won't add anything to the database. When it is ran nothing happens, the database file sits their empty. https://gist.github.com/jamalmoir/50b46fa2fd19bfb566d2
[09:54:30] JMoir: I don't get any errors, it just does nothing.
[09:56:49] JMoir: Haha, right. But the database is empty and I'm specifically putting in data that is valid, so there shouldn't be a problem right?
[10:01:19] JMoir: Ah, it's setting the id to nil
[10:03:56] JMoir: I thought property :id, Serial is supposed to create an autoincrementing integer, why is it set to nil?
[10:07:08] JMoir: Ah... The password hash is too long
[10:07:26] JMoir: Haha, thanks xD
[10:09:53] JMoir: Yup, that was it. All working now :)
[19:53:09] JMoir: Ping timeout: 256 seconds
[20:16:31] JMoir: has joined #ruby
[21:29:44] JMoir: Ping timeout: 246 seconds

2015-07-10

[00:51:52] JMoir: Ping timeout: 265 seconds
[14:35:58] JMoir: has joined #ruby
[14:50:12] JMoir: Ping timeout: 256 seconds
[14:51:04] JMoir: has joined #ruby
[16:17:04] JMoir: Ping timeout: 255 seconds
[16:20:52] JMoir: has joined #ruby
[16:58:57] JMoir: Ping timeout: 244 seconds
[17:20:50] JMoir: has joined #ruby
[17:20:51] JMoir: Remote host closed the connection
[19:57:18] JMoir: has joined #ruby
[20:00:56] JMoir: Hello, probably a stupid question, I'm new to ruby (and sadly testing too!), but how would I test a form that created an entry in a database? I'm testing with Test::Unit and using Sinatra.
[20:02:02] JMoir: I dont have code for this yet, I don't know what to put, that's the problem. I've looked in all the docs I can and searched high and low but I can't find a method of testing for database additions
[20:02:24] JMoir: hah, really dudedudeman?
[20:03:52] JMoir: Antiarc: well if I were to manually test it, I'd take a look in the database and see if it was there... Ah I have an idea, I was heading at it from the wrong direction
[20:05:27] JMoir: Cheers Antiarc xD Sometimes it helps to have someone phrase the problem in a different way to realise how blind you are, haha
[20:07:56] JMoir: Antiarc: Very true, unfortunately! haha
[21:21:31] JMoir: Quit: Lost terminal

2015-07-09

[11:17:05] JMoir: Ping timeout: 246 seconds
[14:07:53] JMoir: Ping timeout: 250 seconds
[14:17:44] JMoir: has joined #ruby
[15:40:44] JMoir: Ping timeout: 256 seconds
[16:20:15] JMoir: has joined #ruby
[17:12:34] JMoir: Quit: Bye
[17:13:37] JMoir: has joined #ruby
[17:14:03] JMoir: Client Quit
[17:15:02] JMoir: has joined #ruby
[17:19:38] JMoir: Ping timeout: 256 seconds
[17:28:10] JMoir: has joined #ruby
[18:37:47] JMoir: Ping timeout: 246 seconds
[19:01:24] JMoir: has joined #ruby

2015-07-08

[21:19:22] JMoir: has joined #ruby
[21:52:43] JMoir: Ping timeout: 276 seconds