by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 19 2018 23:23
    kiddrew commented #14160
  • Nov 19 2018 23:23
    gmcgibbon synchronize #34468
  • Nov 19 2018 23:23
    kiddrew commented #14160
  • Nov 19 2018 23:12
    kamipo commented #34316
  • Nov 19 2018 23:10
    oniofchaos commented #34218
  • Nov 19 2018 23:09
    rafaelfranca synchronize #30320
  • Nov 19 2018 23:08
    oniofchaos commented #34236
  • Nov 19 2018 23:07
    rafaelfranca closed #34487
  • Nov 19 2018 23:07

    rafaelfranca on master

    Prevent TextHelper#word_wrap fr… Merge pull request #34488 from … (compare)

  • Nov 19 2018 23:07
    rafaelfranca closed #34488
  • Nov 19 2018 23:06
    rafaelfranca review_requested #34308
  • Nov 19 2018 23:05
    oniofchaos commented #34280
  • Nov 19 2018 23:01
    oniofchaos commented #34308
  • Nov 19 2018 22:52
    rafaelfranca synchronize #30320
  • Nov 19 2018 22:51

    rafaelfranca on master

    Indent guides as rails help com… Homogenize rails help output I… Merge pull request #34085 from … (compare)

  • Nov 19 2018 22:51
    rafaelfranca closed #34085
  • Nov 19 2018 22:51
    rafaelfranca commented #33643
  • Nov 19 2018 22:51
    rafaelfranca closed #33643
  • Nov 19 2018 22:50

    rafaelfranca on 5-2-stable

    Merge pull request #34106 from … (compare)

  • Nov 19 2018 22:49
    rafaelfranca synchronize #30320
Kaia Leahy
@tenebrousedge
then you didn't do it right
also it produces no output
so you should double check
Fintan Moloney
@Josebuendia
What am I looking for if it outputs nothing?
Kaia Leahy
@tenebrousedge
the folder in question won't be there any more
Fintan Moloney
@Josebuendia
They're there
image.png
Fintan Moloney
@Josebuendia
Got rid of them using: rails destroy scaffold Story
Daniel
@DanL12186
you replaced /path/to/folder with the respect file/path names, right...
Fintan Moloney
@Josebuendia
rails generate scaffold Customer name:string phone:integer
rails generate scaffold Cases topic:string created_at:datetime
So now I just enter the above commands, should work.

create_table(:cases)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

you can't define an already defined column 'created_at'.

So, didn't work, looked fine.
Kaia Leahy
@tenebrousedge
okay
so it's telling you that you already created those tables
Daniel
@DanL12186
It would have taken less effort to read and correct the error from the error message than it was to copy and paste and wait for someone to do it for you.
Kaia Leahy
@tenebrousedge
maybe you should tell rails to skip that step when it's generating the scaffold
Fintan Moloney
@Josebuendia
@DanL12186 But it made no sense I deleted the scaffolds, if I deleted the scaffolds the tables shouldn't be there.
Kaia Leahy
@tenebrousedge
what makes you think that?
I mean, clearly that's a wrong assumption
Daniel
@DanL12186
(Given it didn't work)
And no, scaffolds aren't tied to the existence of created tables
Fintan Moloney
@Josebuendia
Well then at what point did I create the tables?
Daniel
@DanL12186
migrate
Kaia Leahy
@tenebrousedge
and previously, whenever you defined migrations
Fintan Moloney
@Josebuendia
So, it wouldn't let me run migrations because of that prexisting table but I need to run migrations to run the server.
Kaia Leahy
@tenebrousedge
maybe you should tell rails to skip that step when it's generating the scaffold
Fintan Moloney
@Josebuendia
Oh, sorry, try this? But, if fixing the migrations really isn't an option, you can fake it in various ways. First of all, you could just comment out the migration methods, run rake db:migrate, and then uncomment (or revert) the offending migration.
Fintan Moloney
@Josebuendia
But I'm not trying to generate a model, the scaffolds appear to be there. I just need to run the server which requires DB: migrate.
Fintan Moloney
@Josebuendia
It looks like it might be easier to start a new application.
Fintan Moloney
@Josebuendia
So if I enter this command will the user be able to see the id in the user interface and perform CRUD functions to create a new user/case with a new id?
Daniel
@DanL12186
Please just Google, try it out, and follow the error messages.
Fintan Moloney
@Josebuendia

Okay, I'll try these commands again. See what happens. rails generate scaffold Customer name:string phone:integer
rails generate scaffold Cases topic:string created_at:datetime

Problem is, sometimes the error messages their meanings aren't as clear to me as they are to you.

Kaia Leahy
@tenebrousedge
it does help to read them though
matrixbot
@matrixbot
Stephen D Did you add the code in the migration that's needed to drop the tables?
Fintan Moloney
@Josebuendia
Got that sorted. Now I have this problem: ActionView::SyntaxErrorInTemplate in CasesController#index.
Is it because cases is a keyword in Rails? I mean, using the scaffold command and db:migrate command shouldn't lead to any errors.
matrixbot
@matrixbot
Stephen D There's a syntax error in your cases controller file
Stephen D in the index method
Fintan Moloney
@Josebuendia
Yeah, I think once it gets to the index method it gets confused as its a keyword. I'll undo those scaffolds and tables and change the name to issues.
matrixbot
@matrixbot
Stephen D I'm pretty sure cases isn't a reserved word
Stephen D case is
Fintan Moloney
@Josebuendia
The way the cases controller is generated by the scaffold creates a variable /array called case. See: <% @cases.each do |case| %>
<tr>
<td><%= case.case_id %></td>
<td><%= case.topic %></td>
<td><%= case.created %></td>
matrixbot
@matrixbot
Stephen D ah, that's the issue then
Fintan Moloney
@Josebuendia
So, I've been going through this tutorial: https://blog.engineyard.com/using-jquery-with-rails-how-to to try to the Single page app thing sorted. But it says "parsing error, unexpected token". The code: $(document).ready(function() {
$('[data-js-hide-link]').click(function(event){
$(this).parents('li').hide();
event.preventDefault();
});
}
Looks syntactically correct to me.
Tim Krins
@timkrins
@Josebuendia in your last post you are missing the final round bracket ).
Daniel
@DanL12186
Are you not using an IDE?
matrixbot
@matrixbot

Johan Smits > <@gitter_lorensonrails:matrix.org> Hallo everyone, I have a message error that I don't know how to resolve. I also didn't found anything useful on the internet that could help me. This is the message error that I get:

Looks like a missing require of a gem.

Johan Smits Or a the Class Stripe