mac osx and linux same work environment? for example can i..

You'll obviously have to set up Ruby, Rails, your database and the appropriate Ruby database library on your Linux machine first. And then if you have any other external gems/libraries that your app relies on, you'll have to install those separately on your Linux machine as well.

Apart from that, your app should be able to move across with no changes. There are a lot of people who work in OS X and then deploy to Linux servers, which is basically the same thing.