> i saw that its job market is declining

Where? Rails is still incredibly popular last I checked. It's not getting as much press lately as, say, Node.js or whatever frameworks Go has, but the job market for Rails developers is still pretty strong, if not one of the strongest.

> what is the hottest things right now in development job market ?

COBOL.

I shit you not.

You would not believe how many government agencies, financial institutions, healthcare facilities, etc. still rely upon ancient COBOL codebases running on ancient mainframes that are currently maintained by ancient programmers on the verge of retirement. New COBOL programmers are in very high demand, but the supply is atrociously low (for good reason; COBOL makes PHP look as elegant as Lisp in comparison). If you can list COBOL expertise on a CV/resume, you will be hired; it's cheaper to hire you for hundreds of dollars an hour than to hire a full development team for even more hundreds of dollars an hour to migrate to a modern platform.

---

If, on the other hand, you're not in a masochistic mood, you're pretty well served learning Rails (or any other "model-view-controller" or "MVC" framework, like Django or Catalyst or what have you); once you're intimately familiar with MVC concepts and how your models/views/controllers are implemented and interact with one another, moving to another framework is just a matter of learning new syntax.

If that's not enough, might I suggest Erlang/OTP (or perhaps its children, like Elixir or LFE)? It's been getting some well-deserved praise lately for being very well suited for networked software development (including web development). If you're already familiar with Ruby/Rails, Elixir (along with one of the web/MVC frameworks for it, like Phoenix or Sugar) would be a good fit. Quite a few projects use Erlang extensively (Heroku, GitHub, and (if I remember right) Chef use a lot of Erlang, usually to route requests to subprograms written in other languages like Ruby). If nothing else, though, it'll give you a good background in concurrent programming, knowledge of which is increasingly sought after in modern web-facing application development (as evidenced by the recent popularity of Go and Rust, both of which promise better concurrency models than existing non-Erlang solutions).

While you're at it, being familiar with JSON and SQL is a good thing, regardless of what other technology/ies you end up going with; even if you don't ever work with those things directly, JSON and SQL (particularly in the form of PostgreSQL) are increasingly-ubiquitous in modern web-facing software (which is where most of the market is).

In reality, unless you're learning something fairly exotic (like Prolog or PL/I) or absurdly new, you'll be fine job-wise. Even languages whose glory days have faded - like PHP and Perl - have lots of job opportunities, whether from existing codebases needing maintenance (Wordpress comes to mind) or relatively-new codebases that still feel those languages are the best fit (DuckDuckGo comes to mind). Java - like COBOL but not quite like COBOL - is another example of a language with a lot of enterprise users in high demand for those fluent in it to help maintain those codebases.

---

In summary, yes, Rails is totally worth your time to learn for employment opportunity. It still has a very strong job market, and even if it someday doesn't, the MVC concepts you'll learn by learning Rails will apply directly to most other modern (and probably future) web frameworks, thus helping you learn those new frameworks and continue to be employable.

That all said, learning a language or framework or somesuch solely because it'll easily land you a job is a good way to make you hate programming someday. Learn a language because you like that language, not just because you want a paycheck.