![]() However if you have assigned a root password, you must change the database.yml file present in C:\xampp\htdocs\Ruby\config.yml. By default, RoR assumes that your MySQL root password is absent.But I use XAMPP for almost everything so have included it here as well! This procedure should ideally work with WampServer as well, as long as the paths are corrected. Yes, I know this is NOT the only way to install RoR.You will probably need gems like mysql ( gem install mysql), sinatra ( gem install sinatra) etc. Just type in gem install to download and install the gem. Installing any gem is the same procedure as Step 7. I'd urge you to head over to this site, which holds over 16500 Ruby gems. Gems are like modules that can easily be used in any project. Gems are, in my opinion, the most powerful feature of Ruby.you're now officially on the Rails! So now it's time to start developing you web apps with RoR! Open a browser (Read: Firefox! :) ) and type in.Start XAMPP and start the MySQL and Apache services:.These are all the files created automagically by RoR! Nice, ain't it? If you now go to C :\xampp\htdocs\ruby, you should see something like this: Go to the Command Prompt and type in:Ĭ:\Ruby\bin> rails new C:/xampp/htdocs/ruby -d mysqlĬreate app/controllers/application_controller.rbĬreate app/views/layouts/Ĭreate config/environments/development.rbĬreate config/initializers/backtrace_silencers.rbĬreate config/initializers/inflections.rbĬreate config/initializers/secret_token.rbĬreate config/initializers/session_store.rb they must have the correct path of the folder that you created. Note the DocumentRoot and Directory line. LoadModule rewrite_module modules / mod_rewrite.soĭocumentRoot " c:/xampp/htdocs/ruby/public" Now go to C:\xampp\apache\conf and open the file named nf with a text editor (I use Notepad++) and add the following right at the end of the file:.Yeah! So we're all set with RoR! Now let's get XAMPP configured shall we? Go to C:\xampp\htdocs and create a new folder where your RoR project will reside.Let us check if Rails is installed or not:. ![]() Installing ri documentation for rails-3.0.0. INFO: use -ignore-dependencies to install only the gems you list INFO: `gem install -y` is now default and will be removed If you get this output ( or something similar depending on the version of Ruby and RubyGem installed), you have Ruby and RubyGems installed successfully! So How about we get on the rails now, and install RoR?Ĭ:\> gem install rails -include-dependencies.Open a Command Prompt and do the following:.If not present, select the Path row, click edit, and add C:\Ruby\bin at the start. Check if C:\Ruby\bin is present in the Path row.Choose the Advanced tab and then click on Environment Variables.Go to My Computer-> System Properties-> Advanced System Settings.Double Click on the XAMPP executable and install XAMPP in C:\xampp. ![]() Double Click on the Ruby Installer executable and install Ruby into C:\Ruby.except that it deals only with Ruby components/modules (which are called gems) ). ( At it's simplest, Ruby Gems is like the Add/Remove programs feature in Windows. Another thing included in Ruby Installer is Ruby Gems, which is a package manager. Ruby Installer is a compact package containing the entire Ruby setup and all it's dependencies. The latest version of XAMPP (Get it from here).The latest version of Ruby Installer (Get it from here).For this article, I'll be using a system running Windows 7. So let's see how to setup Ruby and RoR on Windows systems! Why Windows? Because the install procedure for Windows is a bit of a pain in the a** compared to the install procedure in Linux. Hopefully, this short intro has gotten you interested in Ruby and RoR. The power of RoR lies in it's simplicity and speed of development! Many popular websites like Twitter, Hulu, Scribd, and Github make use of RoR ( see this). One reason for Ruby's popularity is undoubtedly Ruby on Rails aka RoR, an open source Web Development framework for Ruby. And once you get used to it, Ruby really begins to feel natural! As the creator of the language Matz puts it: " Ruby is about making coding natural, not simple". ![]() Ruby is an Object-Oriented language that was born in the mid-90's, but gained popularity in the early 2000's.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |