Page 1 of 1
[19:55:53] boboc: Hi, i have a question, if i have 2 tables 1 for users and 1 let's say for facebook users, if the user will have posts but he can be logged in either with the email account or with facebook and we assume the other could not exist at a time, what's the best approach to create the association? user to posts and also facebook_users to posts seems wrong
[19:06:05] boboc: guys i have a sample rails app, i have installed nginx and puma to test a droplet on digital ocean to try to deploy a sample app. i have added the 'bind tcp://0.0.0.0:9292' setting in puma.rb and 'server 127.0.0.1:9292' in the nginx upstream directive but when i access a route from the rails app it doesn't work. puma was started and it shows it is listening on tcp://0.0.0.0:9292. Any idea what the problem is? thanks
[19:06:15] boboc: guys i have a sample rails app, i have installed nginx and puma to test a droplet on digital ocean to try to deploy a sample app. i have added the 'bind tcp://0.0.0.0:9292' setting in puma.rb and 'server 127.0.0.1:9292' in the nginx upstream directive but when i access a route from the rails app it doesn't work. puma was started and it shows it is listening on tcp://0.0.0.0:9292. Any idea what the problem is? thanks
[20:16:35] boboc: i have a question, i've added puma gem, my nginx upstream looks like this: server unix:///home/rails/my_app/tmp/sockets/puma.sock fail_timeout=0; how can i start the puma server so nginx could forward the requests?
[09:57:35] boboc: guys i have a question, i have an api and my api controller is inside api/v1 folder
[09:58:45] boboc: if i try to create a test for the controller that have a facebook external call so i can mock it. the issue is that my @controller is nil in the test. i'm using the default minitest. any idea why?
[22:22:44] boboc: i have a question, i'm using active_model_serializer gem and i can't make the response to include the root key. any idea why that might happen? thanks
[21:56:51] boboc: hello, i'm new to rails and i would like to know how can i get besides the user profile from facebook also the credentials info like token and expiration date?
[13:07:23] boboc: guys i have a question, i have an exercise to compare 2 classes and return my value? for ex if i subclass the String and have MyString < String, if i do MyString > String to return true. is this possible?
[13:09:31] boboc: apeiros: not the instance, the class itself. and i know it doesn't make sense, is just an exercise i have and i'm not sure if the Comparable module can be extended somehow so i could control this > response :)
[10:13:27] boboc: Hello, guys i'm new to rails and i have a basic question. If i want to create a website with a top navigation menu that is rendered for almost every page/view (but not for all) how can i do that?
[10:14:15] boboc: and for pages that i want to include the menu, in the controller i render that layout, for the others i will use the basic app layout
[10:15:47] boboc: universal: thanks, that is what i thought :) and if the menu has some logged in/logged out buttons/items? how can i render those conditinal? i thought i could use a view helper where i will check the session[:user_id] and if the user is logged in i render the logged in nav, otherwise i will render the logged out nav items
[16:38:52] boboc: toretore: do you have a url with a tutorial or something where i could check that?
[16:44:20] boboc: toretore: no need to be rude, i'm new to rails and i'm trying to learn how to deploy an app...
[16:46:53] boboc: toretore: i bought a hosting package from digital ocean and i have followed some of their tutorials, i have installed apache2, i have installed passenger, but i don't know what i have to change in the rails project.
[16:48:04] boboc: toretore: i have change the RAILS_ENV in the terminal to RAILS_ENV=production but 'rails server' starts webrick :)
[13:09:56] boboc: guys anyone knows where tcp method is declared? I saw 2 examples used with Socket class where tcp method tool 2 arguments (host + port) or a block where the connected socket is available but in the ruby docs i can't find the tcp method, only in the Addrinfo class...
[13:11:39] boboc: i've looked here because i saw the Socket.tcp('host',80) method call works but here is no tcp class method: http://ruby-doc.org/stdlib-2.1.0/libdoc/socket/rdoc/Socket.html
[13:13:39] boboc: TheLarkInn: i'm learning from a book, the same solution is to use TCPSocket class, i'm just trying to understand where is this tcp method declared to look at it and i can't find it anywhere
[13:18:02] boboc: TheLarkInn: yes in the book that is explained, as i said all i wanted was to find the tcp method declaration and it doesn't seems to be anywhere :)
[17:08:57] boboc: Hello, guys how can i create a server socket in Rails so the client could connect to the server using a TCP connection? i saw Ruby has this class TCPServer but how can i configure a rails app to accept TCP connections using an ip and a port?
[17:10:23] boboc: tbuehlmann: because the server needs to store the location of some cars which would need to be connected to the rails app using TCP and send the latitude/longitude
[17:11:07] boboc: and that location would be sent by the server to another place so the car location is updated on the map
[17:13:44] boboc: Scient: i don't know this is why i've asked here because i'm not sure if this is possible with Rails, i know a little about rails, i know how the routing system works, i know how a rails app works and i'm not sure how someone could connect using a TCP connection
[17:16:33] boboc: toretore: i thought i could use this in rails so i could benefit the orm active record
[22:47:16] boboc: guys i have a basic rails app, i have created 2 objects in the database, i checked the sqlite3 file and objects are there, also if i use rails console the all method returns them, but in the controller the value is nil: http://pastebin.com/t6rnQbfE
[22:49:06] boboc: s2013: it is nil, i've started the rails server with --debugger and if i check the value of @dogs after Dog.all is called it is nil
[22:50:08] boboc: <ActiveRecord::Relation [#<Dog id: 1, name: "Paco", rasa: "yorkie", created_at: "2013-10-29 22:10:28", updated_at: "2013-10-29 22:10:28">]>
[22:56:47] boboc: s2013: yup, you are right, in the view the value is printed, but it is an active record: my var value: DOGG: #<ActiveRecord::Relation::ActiveRecord_Relation_Dog:0x007f9367dd7af0>
[23:02:12] boboc: 1 more question, in the view if i write this code it gives me a syntax error: <%= @dogs.each do |dog| %>
[00:11:46] boboc: how can i format an flaot to show with the $ at the begining? from 10.5 to format $10.5 ?
[20:41:48] boboc: guys i'm new to ruby and i was wondering why the official docs classes doesn't include the ivard, just the methods? (http://www.ruby-doc.org/core-2.0.0/)