Page 1 of 1
[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?
[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...
[10:59:17] JMoir: Does anyone know of a good gem to add [img](etc) codes to posts? What is that feature even called?
[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:40:36] JMoir: havenwood: https://asakusarb.doorkeeper.jp/ this? Every Tuesday? I'd be stupid not to go!
[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:13:22] JMoir: https://gist.github.com/jamalmoir/c3384a264fbdb2bb9ee7 this is what I'm trying to do
[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?
[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: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:45:33] JMoir: rackup won't even start, updated gist with error https://gist.github.com/jamalmoir/3bc5b7d50b5acb7f14a4
[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: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.
[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: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:03:56] JMoir: I thought property :id, Serial is supposed to create an autoincrementing integer, why is it set to nil?
[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: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