former php user trying to learn ruby...very tough - ruby

i write something in ruby thinking that it will work as it did in php but no!
i realized that you need to clone objects using .clone
merely associating to a variable doesn't work !
in php this worked fine!
it took 2 days until i discovered this error!
what tutorials can i read to get firm grasp on ruby ?!

Why's poignant guide to ruby

You might also want to look at the Pickaxe online.

Beginning Ruby by Peter Cooper is a good option.

I am a new Ruby user as well. What I did was build a web app first with Rails and then move into the Ruby core. This is the book I started with.
Foundation Rails 2

Check out this book: Rails for PHP Developers

Related

Ruby: code "updgrading" from 1.8.6 to 1.9.2

i'm interested in updating code which is written in ruby v1.8.6 to 1.9.2. Are there any useful links to read about (probably with some warnings and recommendations)?
Just to be clear, so, i'm not expecting any problems right now, but i would like to avoid them.
P.S.
Links like this one are mostly not helpful.
A slideshow showing the differences: http://slideshow.rubyforge.org/ruby19.html#11
I migrated an app from ruby 1.8.7 to 1.9.3 a few days ago, and no problems happened.
Bu i advise you to test all of your code for little bugs.
Verify that all the gems you depend on are 1.9.2 compatible. isitruby19.com is a good resource to check this.
Other than that, the best strategy is to try migrating and do some testing. If your application has comprehensive unit test coverage, this shouldn't be too painful.

Problems creating a railtie for a rails ORM gem I'm developing

I am developing a Ruby gem, Ampere, that acts as an ORM for the Redis database. I am trying to shore up its Rails integration, and was able to tie in an initializer and console hook, but my generators do not work yet. I have a generator, ampere:config that installs a default configuration YAML file, and a replacement for the model generator as well.
When I install my gem into a testing Rails app, the ampere:config generator shows up in the list when I run rails generate on the command line, but when I type rails g ampere:config, I get:
Could not find generator ampere:config.
and nothing else. My generator lives in "lib/rails/generators/config/" within the gem, and clearly Rails knows about it since it showed up in the rails g list, but something's not right. If anyone can help or knows of some better documentation for this than the Rails Guides, which are sparse to say the least, it'd be much appreciated.
Ok so I finally got this. For the generators to work, they have to call source_root with the relative path of their templates, and they have to live in lib/rails/generators/your_gem_name/, then the directory structure in your_gem_name/ is what you'd expect from reading the documentation (or running rails g generator in a Rails project).
The documentation is not very clear about this, so it was a bit confusing, but after looking at a few examples I tried this and it worked.

How can i test app with thinking sphinx with rspec?

I have Ruby on Rails 3.1 application and i use for Sphinx + Thinking sphinx for searching. For testing i use RSpec + autotest. I want to test my searching. Where can i read how to test my app right via rspec?
I have compiled a gem that helps with the testing process. It is working but needs some love and attention also! :D
That is not what i actually wanted but:
http://freelancing-god.github.com/ts/en/testing.html
Hope, it will be useful for someone.

Beginner in CodeIgniter

Ok...so I've just started playing around with Codeigniter. I've followed the two tuts on their website and I'm looking for more resources to expand my knowledge. What do you guys recommend?
Start writing an application using CI. You'll learn more than any tutorial will teach you...
Nettuts' CodeIgniter from Scratch series is really useful for beginners.
Other than that, like #Justin said, just make an app.
You can also watch these two videos: http://codeigniter.com/tutorials/
You can also take a look at this tutorial which shows you how can you keep your controllers clean and non fat: http://chris-schmitz.com/cleaning-up-your-codeigniter-controllers/

Continuous Integration setup for ruby projects on linux server

I would like to use open source tools if possible.
here are 2 links I found but haven't tried them -
http://pivots.pivotallabs.com/users/chad/blog/articles/471-continuous-integration-in-a-box-exploring-tsttcpw
http://laurentbois.com/category/continuous-integration/
Try this CruiseControl.rb
http://cruisecontrolrb.thoughtworks.com/
CruiseControl.rb is written in Ruby and designed for ruby.
Another one is Hudson, it is built in Java, but it has a plugin for ruby
https://hudson.dev.java.net/
Give Cinabox a try (I'm the author). It is intended to make this as simple as possible, and uses cruisecontrol.rb. There is a screencast and readme. If you have problems, open a ticket using the LightHouse link in the readme.
Good Luck!
There is a lightweight CI server written in Sinatra called Integrity which you might want to take a look at. I mainly used it because it supports git.
Git Reference

Resources