Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Ad icon
ZTE MF283U 4G Unlocked Router (Used)
ayanthamaxi
Updated:
Sunday at 8:26 PM
ලංකාවේ හොඳම උපකාරක පන්ති සහ ගුරුවරුන් එකම තැනකින් - TopTuition.lk
dulithapathum
Updated:
Saturday at 8:07 AM
Colombo
RidhMathraa ’26 🎶✨
Tmadhusanka
Updated:
Wednesday at 11:58 PM
Ad icon
Colombo
PXN V10 Pro Direct Drive Racing Wheel (Under Warranty)
Abdur Rahman
Updated:
Wednesday at 10:23 PM
Ad icon
USDT ණය සේවාව - USDT Loan Service
පුරවැසියා
Updated:
Wednesday at 4:54 PM
Electronics
Vehicles
Property
Search
Reply to thread
Forums
Computers & Internet
Software Development
Ruby 2.2.3 Install කරමු - Linux
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="dhanush_c" data-source="post: 19599753" data-attributes="member: 530786"><p><span style="font-size: 18px">Ruby කියන්නේ අද වෙනකොට ජනප්රිය වෙලා තියන Object Oriented Programming language එකක්. ඒ වගේම මේක ජනප්රිය වෙන්න තව හේතුවක් වෙන්නේ Ruby on rails framework එක. මේ පොස්ට් එකේ විස්තර වෙන්නේ Ruby install කරන්නේ කොහොමද කියලා. මේ පොස්ට් එක ලියන වෙලාවේ තියන latest version එක 2.2.3 එක.</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">මුලින්ම dependencies install කරගන්න ඕන.</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">[code]</span></p><p><span style="font-size: 18px">[SIZE="3"]cd</span></p><p><span style="font-size: 18px">git clone git://github.com/sstephenson/rbenv.git .rbenv</span></p><p><span style="font-size: 18px">echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc</span></p><p><span style="font-size: 18px">echo 'eval "$(rbenv init -)"' >> ~/.bashrc</span></p><p><span style="font-size: 18px">exec $SHELL</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build</span></p><p><span style="font-size: 18px">echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc</span></p><p><span style="font-size: 18px">exec $SHELL</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">rbenv install 2.2.3</span></p><p><span style="font-size: 18px">rbenv global 2.2.3[/SIZE]</span></p><p><span style="font-size: 18px">[/code]</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">දැන් Ruby install කරන්න තියෙන්නේ. මේකට ක්රම 3ක් තියනවා. එකින් එක බලමු මොනවද කියලා.</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px"><strong>Using rbenv</strong></span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">[code] [SIZE="3"]cd</span></p><p><span style="font-size: 18px">git clone git://github.com/sstephenson/rbenv.git .rbenv</span></p><p><span style="font-size: 18px">echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc</span></p><p><span style="font-size: 18px">echo 'eval "$(rbenv init -)"' >> ~/.bashrc</span></p><p><span style="font-size: 18px">exec $SHELL</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build</span></p><p><span style="font-size: 18px">echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc</span></p><p><span style="font-size: 18px">exec $SHELL</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">rbenv install 2.2.3</span></p><p><span style="font-size: 18px">rbenv global 2.2.3[/SIZE]</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">[/code]</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px"><strong>Using rvm</strong></span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">[code]</span></p><p><span style="font-size: 18px">[SIZE="3"]sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev</span></p><p><span style="font-size: 18px">curl -L https://get.rvm.io | bash -s stable</span></p><p><span style="font-size: 18px">source ~/.rvm/scripts/rvm</span></p><p><span style="font-size: 18px">rvm install 2.2.3</span></p><p><span style="font-size: 18px">rvm use 2.2.3 --default[/SIZE]</span></p><p><span style="font-size: 18px">[/code]</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px"><strong>Using Source</strong></span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">[code][SIZE="3"]</span></p><p><span style="font-size: 18px">cd</span></p><p><span style="font-size: 18px">wget http://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.gz</span></p><p><span style="font-size: 18px">tar -xzvf ruby-2.2.3.tar.gz</span></p><p><span style="font-size: 18px">cd ruby-2.2.3/</span></p><p><span style="font-size: 18px">./configure</span></p><p><span style="font-size: 18px">make</span></p><p><span style="font-size: 18px">sudo make install[/SIZE]</span></p><p><span style="font-size: 18px">[/code]</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">වැඩේ ඉවර උනාට පස්සේ test කරලා බලන්න.</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">[code][SIZE="3"]ruby -v[/SIZE][/code]</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">Ruby gems install කරද්දී documentation එක discard කරන්න command එක දෙන්න ඕන දැන්.</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">[code][SIZE="3"]echo "gem: --no-ri --no-rdoc" > ~/.gemrc[/SIZE][/code]</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">දැන් Bundler install කරගමු. Bundler කියන්නේ Ruby gems manager එකක්. gems වල ගැලපෙන version manage කරන එක කරන්නේ මේකෙන්.</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">[code][SIZE="3"]gem install bundler[/SIZE][/code]</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">දැන් sample code එකක් run කරලා බලමු.</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">මුලින්ම terminal එක open කරගෙන පහල command එක run කරන්න.</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">[code][SIZE="3"]nano sample.rb[/SIZE][/code]</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">දැන් nano editor එකෙන් new file එක create වෙයි. මේ code line එක add කරන්න.</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">[code]</span></p><p><span style="font-size: 18px">[SIZE="3"]puts "Ruby installed and running.."[/SIZE]</span></p><p><span style="font-size: 18px">[/code]</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">දැන් file එක save කරගන්න ctrl+x සහ y දීලා enter කරන්න. දැන් file එක run කරන්න.</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">[code][SIZE="3"]ruby sample.rb[/SIZE][/code]</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">දැන් terminal එකේ output එක display වෙයි.</span></p><p></p><p><span style="font-size: 15px"><span style="color: Red"><a href="https://dhanushkablog.wordpress.com/" target="_blank">https://dhanushkablog.wordpress.com/</a></span></span></p></blockquote><p></p>
[QUOTE="dhanush_c, post: 19599753, member: 530786"] [SIZE="5"]Ruby කියන්නේ අද වෙනකොට ජනප්රිය වෙලා තියන Object Oriented Programming language එකක්. ඒ වගේම මේක ජනප්රිය වෙන්න තව හේතුවක් වෙන්නේ Ruby on rails framework එක. මේ පොස්ට් එකේ විස්තර වෙන්නේ Ruby install කරන්නේ කොහොමද කියලා. මේ පොස්ට් එක ලියන වෙලාවේ තියන latest version එක 2.2.3 එක. මුලින්ම dependencies install කරගන්න ඕන. [code] [SIZE="3"]cd git clone git://github.com/sstephenson/rbenv.git .rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(rbenv init -)"' >> ~/.bashrc exec $SHELL git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc exec $SHELL git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash rbenv install 2.2.3 rbenv global 2.2.3[/SIZE] [/code] දැන් Ruby install කරන්න තියෙන්නේ. මේකට ක්රම 3ක් තියනවා. එකින් එක බලමු මොනවද කියලා. [B]Using rbenv[/B] [code] [SIZE="3"]cd git clone git://github.com/sstephenson/rbenv.git .rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(rbenv init -)"' >> ~/.bashrc exec $SHELL git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc exec $SHELL git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash rbenv install 2.2.3 rbenv global 2.2.3[/SIZE] [/code] [B]Using rvm[/B] [code] [SIZE="3"]sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev curl -L https://get.rvm.io | bash -s stable source ~/.rvm/scripts/rvm rvm install 2.2.3 rvm use 2.2.3 --default[/SIZE] [/code] [B]Using Source[/B] [code][SIZE="3"] cd wget http://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.gz tar -xzvf ruby-2.2.3.tar.gz cd ruby-2.2.3/ ./configure make sudo make install[/SIZE] [/code] වැඩේ ඉවර උනාට පස්සේ test කරලා බලන්න. [code][SIZE="3"]ruby -v[/SIZE][/code] Ruby gems install කරද්දී documentation එක discard කරන්න command එක දෙන්න ඕන දැන්. [code][SIZE="3"]echo "gem: --no-ri --no-rdoc" > ~/.gemrc[/SIZE][/code] දැන් Bundler install කරගමු. Bundler කියන්නේ Ruby gems manager එකක්. gems වල ගැලපෙන version manage කරන එක කරන්නේ මේකෙන්. [code][SIZE="3"]gem install bundler[/SIZE][/code] දැන් sample code එකක් run කරලා බලමු. මුලින්ම terminal එක open කරගෙන පහල command එක run කරන්න. [code][SIZE="3"]nano sample.rb[/SIZE][/code] දැන් nano editor එකෙන් new file එක create වෙයි. මේ code line එක add කරන්න. [code] [SIZE="3"]puts "Ruby installed and running.."[/SIZE] [/code] දැන් file එක save කරගන්න ctrl+x සහ y දීලා enter කරන්න. දැන් file එක run කරන්න. [code][SIZE="3"]ruby sample.rb[/SIZE][/code] දැන් terminal එකේ output එක display වෙයි.[/SIZE] [SIZE="4"][COLOR="Red"][URL="https://dhanushkablog.wordpress.com/"]https://dhanushkablog.wordpress.com/[/URL][/COLOR][/SIZE] [/QUOTE]
Insert quotes…
Verification
Hata thunen beduwama keeyada? (60 bedeema thuna)
Post reply
Top
Bottom