Need some information

Hello there.

A friend of mine asked me to finish RoR project. Project is almost
finished, but there are plenty of bugs to be fixed.
I don't have Ruby and RoR experience, but I have degree in software
engineering and some C\C++\Python(not Django)\CUDA knowledge. What
should I read first to get into Ruby and RoR? I know the basics, so I
don't need beginners tutorial or something like that.
I don't have time to read big books, because deadline is in 3 months.

Thanks in advance.

Take a look at official guides http://guides.rubyonrails.org first
Then read Agile Web Development with Rails 4th Ed if you have time

Good luck

Try buying the book "Agile Web Development with Rails". It might help.
There is also good rails documentation available at http://rubyonrails.org/documentation
. Browse through http://rubonrails.org to know more about Rails. And
never hesitate to ask doubts in this group.

If you dont know Ruby / HTML/ CSS , you must learn them first. You can
try m free ruby book @ http://mindaslab.in/ilr . For HTMML and CS
there is plenty of tutorial on web like http://w3schools.com

If you have 3 months to work on a Rails app, then you have plenty of
time to read lots of books...

But start with AWDWR (you don't say whether your friend's project is
Rails 2.x or 3, so make sure you get the right version of the book for
the app).
Then familiarise yourself with the Ruby and Rails api commands - the
documentation is online. Also run through the Ruby Koans (will
probably take a few hours) as a great way to see how stuff you're
familiar with from other languages is done in Ruby.

If you have any specific problems, just post them here.

Thanks, guys. RoR is 2.3.8
I've already bought third edition of Agile Web Development with Rails.

Well, analysis has shown that database should be refactored, because
it's pretty unstructured, some data is duplicated or unnecessary etc.
Some tables are used by another modules(not RoR).
What is the best way (i mean easiest)) ) to redesign database?
Should I use migrations?
Or just write database in plain SQL and then generate objects from SQL
tables?
Or modify existing models manually?

Well, analysis has shown that database should be refactored, because

it’s pretty unstructured, some data is duplicated or unnecessary etc.

Some tables are used by another modules(not RoR).

So… I am guessing you wont touch these, or do you have a manner (i.e. test suite) which will allow you to make such changes and know if you broke something?

What is the best way (i mean easiest)) ) to redesign database?

Should I use migrations?

Or just write database in plain SQL and then generate objects from SQL

tables?

Or modify existing models manually?

Same goes as above, first, is the project working? Is there a test suite? Do you trust the test coverage? If you have no test coverage and have a working project you are taking on a lot of risk to start changing the db structure around.

First make sure you are using a Version Control System (git for
example) so you can track the changes you make.
Second, as Danaka has suggested, make sure you have full test coverage.
Then, yes use migrations to modify the database, one step at a time,
modify the models appropriately, and check the tests pass (along with
new ones you will write to check any new model methods). Then make
the next change to the database and so on.

Colin

Learn Rails by Example (Michael Hartl) is good tutorial (http://ruby.railstutorial.org/ruby-on-rails-tutorial-book).

David K. wrote in post #1031856:

So... I am guessing you wont touch these, or do you have a manner (i.e.
test suite) which will allow you to make such changes and know if you
broke something?

Perhaps, I will not))

Same goes as above, first, is the project working? Is there a test
suite?
Do you trust the test coverage? If you have no test coverage and have a
working project you are taking on a lot of risk to start changing the db
structure around.

Project works, but there are plenty bugs. Some of them are caused by
poor db design.
Unfortunately, there are no tests. ))

I'm definitely using git.

David K. wrote in post #1031856:

So... I am guessing you wont touch these, or do you have a manner (i.e.
test suite) which will allow you to make such changes and know if you
broke something?

Perhaps, I will not))

Same goes as above, first, is the project working? Is there a test
suite?
Do you trust the test coverage? If you have no test coverage and have a
working project you are taking on a lot of risk to start changing the db
structure around.

Project works, but there are plenty bugs. Some of them are caused by
poor db design.
Unfortunately, there are no tests. ))

In that case write the tests first, including ones that demonstrate
the known bugs. Then you will be able to sleep soundly as you make
the changes secure in the knowledge that you should not be introducing
too many new bugs :slight_smile:

Perhaps I could have phrased that better, I am not advising that you
sleep *whilst* making the changes.

I'm definitely using git.

Excellent.

Colin