Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is everything in Ruby can be used in Rails?

It might be a silly question, but seriously is everything in Ruby works in Rails?

I mean is that rails did not overwrite anything, but just added new things to ruby, right?

(Sorry for the silly question. I just learnt rails for about 4 months and no any experience in ruby yet (except rails ;D)).

like image 226
PeterWong Avatar asked Jan 21 '23 09:01

PeterWong


2 Answers

Rails is just a framework written in ruby, so in principle you should be able to use any library, class or module you want to. However not everything makes sence, like GUI frameworks etc.

The ruby implementation and platform you're running on may also have limitations, like everything may not work on a windows server, or on MacRuby or JRuby etc.

like image 195
harald Avatar answered Jan 23 '23 21:01

harald


Nothing is delete by Rails about Ruby, it's just add some new class and method to standard ruby libraries.

like image 24
shingara Avatar answered Jan 23 '23 21:01

shingara