Rails 2.1 windows


















Rails has created basic structure of our application. All three environments: development, test and production will use different SQlite3 databases named after the name of the corresponding environment with extension. You can now start application. If you followed all instructions from the book you will see server's log messages in the Command Prompt:.

But if you jumped right to this chapter there are few important things I must emphasize. If you built sqlite3 gem from the sources it is linked against libsqlite You have to copy sqlite3. On the other hand if you just installed binary version of sqlite3 gem it is linked against sqlite3. This is actually the same shared library but with different name.

In that case you have two solutions. The first one is to just rename built dll or you can download official version from SQlite3 site and unpack it to the folder that is in the path. Nevertheless SQlite3's shared library and executable must be in the path. This is common mistake of Rails on Windows beginners so keep that on your mind. The reason we're going to be using Bash on Ubuntu on Windows because it allows you to run Linux on your Windows machine.

Most Ruby on Rails tutorials and dependencies work best on Linux, so this allows you to get the best of both worlds. A Windows machine for your day to day work, and a Linux subsystem for Ruby on Rails development. This only works on bit installations of Windows. This is also in beta, so this won't be nearly as robust as running a Linux virtual machine, but it can definitely do the basics well enough.

Windows 10 allows you to run various Linux operating systems inside of Windows similar to a virtual machine, but natively implemented.

We'll use this to install Ruby and run our Rails apps. Next install Ubuntu from the Microsoft Store. Now open Ubuntu in the Start menu or by running wsl in PowerShell or the command prompt. You'll be asked to setup a new user for Ubuntu. Remember this password as it's what you'll use later on when installing packages with sudo.

You've now got a Ubuntu terminal on Windows. You'll use this to run your Rails server and other processes for development. Installing with rbenv is a simple two step process. We'll be using Git for our version control system so we're going to set it up to match our Github account. If you don't already have a Github account, make sure to register. It will come in handy for the future. Replace my name and email address in the following steps with the ones you used for your Github account.

The next step is to take the newly generated SSH key and add it to your Github account. You want to copy and paste the output of the following command and paste it here.

Since Rails ships with so many dependencies these days, we're going to need to install a Javascript runtime like NodeJS and a package manager called Yarn. If you're using rbenv, you'll need to run the following command to make the rails executable available:. Now that you've installed Rails, you can run the rails -v command to make sure you have everything installed correctly:.

If you get a different result for some reason, it means your environment may not be setup properly. Rails ships with sqlite3 as the default database. For example: if you downloaded the 64 bit ruby, you need to get the devkit for the 64 bit ruby. I was able to get it to work in this way. That sounds like an SSL error you get when trying to fetch gems — not specific to Rails.

Basically you need to set the certificate authority to allow you to download gem files. Probably moved on now but after 4 hours trying to get rails working and then another hour having this bcrypt issue i resolved it by moving from 64 bit to 32 bit ruby. But that may just be more confusing in blog format. Thanks for the feedback! Ah, the hazards of working on 3 operating systems at once.

Thanks for pointing this out! You must be logged in to post a comment. Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. Learn how to build a website using Ruby and the Rails framework. Our Techdegree takes you from beginner to interview-ready—explore the program with a seven-day free trial. Anisio on April 5, at pm said:.

Log in to Reply.



0コメント

  • 1000 / 1000