People are yelling, why?

I’m new to learning how to think, and programming, actually. While I
don’t mind being thrown to the wolves, I have no idea how to fix the
issue I’m struggling with, which is the following:
I currently have a table where two tabs, one, incomplete, and two,
complete have pagination tabs at the bottom of the table. the document
model reads self.per_page = 10, which represents the number of documents
before moving onto the next page. currently, I’ve made 10 documents, and
can move between pages smoothly. however, when on the complete tab, and
while there is only one entry when clicking for the next page, I’m being
redirected to the incomplete tab, and i don’t want that.

some helpful dude, though didn’t work was like

@post = Post.paginate(:page => params[:page]) #controller
= will_paginate @post, renderer: BootstrapPagination::Rails #view

where post is changed out with document.

so what i did in the document_controller.rb file was definded a method
index and ended the method. when defining the method, I put @document =
Document.paginate(:page => params[:page]) and the shit just broke.

this application is currently running ruby 2.0.0 and rails 3.2.19

the gems which might have something to do with this particular story I’m
struggling with are:

gem ‘will_paginate-bootstrap’, ‘1.0.1’
gem ‘bootstrap-sass’, ‘~> 3.3.1’
gem ‘haml-rails’, ‘~> 0.4’

os x for operating system 10.9.5

besides abusing the privilege of stupidity, mind shedding some lite for
this nuby, please?

I appreciate your time.

On 4 February 2015 at 19:35, Justin C. [email protected] wrote:

some helpful dude, though didn’t work was like

@post = Post.paginate(:page => params[:page]) #controller
= will_paginate @post, renderer: BootstrapPagination::Rails #view

where post is changed out with document.

so what i did in the document_controller.rb file was definded a method
index and ended the method. when defining the method, I put @document =
Document.paginate(:page => params[:page]) and the shit just broke.

This will give you some hints on how to debug your rails application
so you can get a handle on what is going wrong.

this application is currently running ruby 2.0.0 and rails 3.2.19

If developing new apps you should be using something much newer than
that. 3.2 will, I believe, be going out of support in a few months.

Colin

understood. I’ve been telling these people we should update the
versioning of both ruby, and rails, however, I’m told to just sit in the
corner, therefore, again, new to learning how to think, but with
following certain pieces on the web, anyone who works with rails, and
ruby know outdated shit is a no go. like, apparently using the gem
‘unicorn’ isn’t recommended when using heroku “Heroku recommends using
the Puma web server instead of Unicorn. If you are using Unicorn, your
application is not protected against a slow client attack.” besides the
gem being used with heroku, isn’t unicorn prone to all attacks even if
not using unicorn? we’re using amazon, but again, nuby.

anyway, can you possibly shed some light on my struggles, as for obvious
reasons, I can’t figure out.

like, people are yelling at me, coz this issue isn’t fixed. wtf?

On 4 February 2015 at 19:55, Justin C. [email protected] wrote:

anyway, can you possibly shed some light on my struggles, as for obvious
reasons, I can’t figure out.

Since you have not quoted the previous message no-one knows who you
are addressing. Remember this is a mailing list not a forum (though
you may be using it through a forum-like interface.

I posted a link in my previous message to a guide that should help you
debug the application. Also if you are being directed about which
version of rails to use and so on, is there not someone there who can
help you with debugging?

Colin

Colin L. wrote in post #1167684:

On 4 February 2015 at 19:55, Justin C. [email protected] wrote:

anyway, can you possibly shed some light on my struggles, as for obvious
reasons, I can’t figure out.

Since you have not quoted the previous message no-one knows who you
are addressing. Remember this is a mailing list not a forum (though
you may be using it through a forum-like interface.

I posted a link in my previous message to a guide that should help you
debug the application. Also if you are being directed about which
version of rails to use and so on, is there not someone there who can
help you with debugging?

Colin

@Colin. My apologies for not addressing the forum properly.

I have no idea how to reference the url sent with the application I’m
working on.

No, one senior dev got fired, just a few weeks ago. Another loved
working his own hours beside conforming to the 9-5. Therefore, there is
a senior dev ops dev who doesn’t like helping out, but is lead at the
moment until we get a senior dev in a few weeks. So, I’m fucked pretty
much, as the tickets which have been assigned to me are mostly small
markup and cascading changes, but this is deeper, the one I’m reaching
out for help on.

On 4 February 2015 at 20:18, Justin C. [email protected] wrote:

I posted a link in my previous message to a guide that should help you
debug the application. Also if you are being directed about which
version of rails to use and so on, is there not someone there who can
help you with debugging?

Colin

@Colin. My apologies for not addressing the forum properly.

I have no idea how to reference the url sent with the application I’m
working on.

Sorry, no idea what you mean by that.

No, one senior dev got fired, just a few weeks ago. Another loved
working his own hours beside conforming to the 9-5. Therefore, there is
a senior dev ops dev who doesn’t like helping out, but is lead at the
moment until we get a senior dev in a few weeks. So, I’m fucked pretty
much, as the tickets which have been assigned to me are mostly small
markup and cascading changes, but this is deeper, the one I’m reaching
out for help on.

How are you getting on with rails guide that I posted the link for?

Also I suggest you take time out to work right through a good tutorial
such as railstutorial.org (which is free to use online) that will show
you the basics of rails and while doing it you will find out about
debugging also as you track down the typos you made and work through
the exercises.

Colin

Colin L. wrote in post #1167687:

On 4 February 2015 at 20:18, Justin C. [email protected] wrote:

I posted a link in my previous message to a guide that should help you
debug the application. Also if you are being directed about which
version of rails to use and so on, is there not someone there who can
help you with debugging?

Colin

@Colin. My apologies for not addressing the forum properly.

I have no idea how to reference the url sent with the application I’m
working on.

Sorry, no idea what you mean by that.

No, one senior dev got fired, just a few weeks ago. Another loved
working his own hours beside conforming to the 9-5. Therefore, there is
a senior dev ops dev who doesn’t like helping out, but is lead at the
moment until we get a senior dev in a few weeks. So, I’m fucked pretty
much, as the tickets which have been assigned to me are mostly small
markup and cascading changes, but this is deeper, the one I’m reaching
out for help on.

How are you getting on with rails guide that I posted the link for?
Debugging Rails Applications — Ruby on Rails Guides

Also I suggest you take time out to work right through a good tutorial
such as railstutorial.org (which is free to use online) that will show
you the basics of rails and while doing it you will find out about
debugging also as you track down the typos you made and work through
the exercises.

Colin

looked at the url, and was like how am I supposed to reference this with
what I’m doing, and beat my head against the wall.

yes, I remember you reaching out once before regarding a post I posted
on the ruby forum. been trying to work on rails tutorial actually.

again, many thanks for reaching out.

Colin L. wrote in post #1167691:

On 4 February 2015 at 20:57, Justin C. [email protected] wrote:

much, as the tickets which have been assigned to me are mostly small
the exercises.

Colin

looked at the url, and was like how am I supposed to reference this with
what I’m doing, and beat my head against the wall.

Let me ask a question. Do you understand (mostly) the code that you
are trying to fix? That is do you understand the basic flow through
it and what each section of the code does? At least the part that is
giving problems.

If you do understand it then the next task is to find out which bit is
failing. One easy way to start this is just to insert puts or inspect
commands in the ruby, to show where the code is and what the value of
variable is, the results of this will be printed in the server log
when it is executed. Then you can study that log and try to work out
what is going on.

If the above does not make sense then I am afraid you need to go on
some sort of training course or spend some time working through books
and stuff, in order that you get to the stage of understanding what I
am talking about.

If you do not understand the basic flow in a Rails app then as I said
take some time out (probably a week or so) and work right through that
tutorial. In the long run it will be time well spent. You are just
wasting your employers money banging your head against a brick wall
because of a fundamental lack of understanding of what you are trying
to do.

Colin

Colin.

Yes, I lack fundamentals, the point came across clear. Actually, it
would be beneficial to the company and an entry level thinker to have a
senior developer on hand to help out.

Thanks.

On 4 February 2015 at 20:57, Justin C. [email protected] wrote:

much, as the tickets which have been assigned to me are mostly small
the exercises.

Colin

looked at the url, and was like how am I supposed to reference this with
what I’m doing, and beat my head against the wall.

Let me ask a question. Do you understand (mostly) the code that you
are trying to fix? That is do you understand the basic flow through
it and what each section of the code does? At least the part that is
giving problems.

If you do understand it then the next task is to find out which bit is
failing. One easy way to start this is just to insert puts or inspect
commands in the ruby, to show where the code is and what the value of
variable is, the results of this will be printed in the server log
when it is executed. Then you can study that log and try to work out
what is going on.

If the above does not make sense then I am afraid you need to go on
some sort of training course or spend some time working through books
and stuff, in order that you get to the stage of understanding what I
am talking about.

If you do not understand the basic flow in a Rails app then as I said
take some time out (probably a week or so) and work right through that
tutorial. In the long run it will be time well spent. You are just
wasting your employers money banging your head against a brick wall
because of a fundamental lack of understanding of what you are trying
to do.

Colin

On Wednesday, 4 February 2015 14:36:40 UTC-5, Ruby-Forum.com User wrote:

redirected to the incomplete tab, and i don’t want that.
Document.paginate(:page => params[:page]) and the shit just broke.

The hardest error to debug remotely is “shit just broke”. What happened?
What error message do you get when you access that route through the
browser?

–Matt J.

On 5 February 2015 at 21:25, Justin C. [email protected] wrote:

–Matt J.

Matt.

thanks for reaching out. yea, no error, just error in the interface,
which i can’t fix on the html, or css side. no worries, though. Colin
was right; I’m too inexperienced, which is probably why I’m getting let
go of.

That’s too bad.

So there Colin, you called a spade a spade.

Certainly no insult was intended. Everyone is inexperienced until
experience is gained. Everyone remains inexperienced at most things
throughout their lives.
It sounds like your employer was looking for a senior developer but
took on a junior and was not prepared to provide the training. More
fool they.

If you want to continue learning rails one useful strategy is to
follow this list. Every time you see a question that you understand
then make sure you understand the answers. In no time you will be
answering questions yourself.

Good luck

Colin

Colin

Matt J. wrote in post #1167747:

On Wednesday, 4 February 2015 14:36:40 UTC-5, Ruby-Forum.com User wrote:

redirected to the incomplete tab, and i don’t want that.
Document.paginate(:page => params[:page]) and the shit just broke.

The hardest error to debug remotely is “shit just broke”. What happened?
What error message do you get when you access that route through the
browser?

–Matt J.

Matt.

thanks for reaching out. yea, no error, just error in the interface,
which i can’t fix on the html, or css side. no worries, though. Colin
was right; I’m too inexperienced, which is probably why I’m getting let
go of. So there Colin, you called a spade a spade.

take care.

Colin L. wrote in post #1167755:

On 5 February 2015 at 21:25, Justin C. [email protected] wrote:

–Matt J.

Matt.

thanks for reaching out. yea, no error, just error in the interface,
which i can’t fix on the html, or css side. no worries, though. Colin
was right; I’m too inexperienced, which is probably why I’m getting let
go of.

That’s too bad.

So there Colin, you called a spade a spade.

Certainly no insult was intended. Everyone is inexperienced until
experience is gained. Everyone remains inexperienced at most things
throughout their lives.
It sounds like your employer was looking for a senior developer but
took on a junior and was not prepared to provide the training. More
fool they.

If you want to continue learning rails one useful strategy is to
follow this list. Every time you see a question that you understand
then make sure you understand the answers. In no time you will be
answering questions yourself.

Good luck

Colin

Colin

Colin, I know nothing was intended, really, just think it’s funny how
this all played out is all. like, the thread yesterday. Me being pulled
into the project managers office today…etc. honestly don’t even know
you, but you seem like a great dude.

Yes, I want to continue learning how to think, and grow my knowledge, so
I can call myself a developer, just takes me longer to pick up on
things.

Many thanks for everything.