how do I start Webrick server on windows 10? - ruby-on-rails

I am very new to Ruby on Rails. As I was setting up...everthing seem to be going fine until I ran "rails s".Webrik didnt start!
my OS is Windows 10.
I am using this tutorial http://installfest.railsbridge.org/installfest/windows

At first you need to create new app rails new my_app then switch folder to /my_app and then you can do rails s
you have to read your logs

Related

why rails server is not working on windows 10

I have created the new rails project and trying to run it without doing any changes. I am using the power shell in windows 10. When I am running the rails s command its not starting the server. Please see attached image. I have highlighted the installed ruby version.
The error is there in the output, you do not have a rails app to start a server for, you can create a new app with:
rails new <name-for-your-app>
Follow along this tutorial
to help you get started with rails.
I think this command will work or you are missing something which is required to run rails server
bin/rails server
I've got similar error when I am not in rails project directory. Seems you are out of directory.
Please run those full commands in powershell
cd c:/
rails new testapp
cd testapp
rails s

I have a complete ruby project on my system but how do I run it?

I have a complete ruby project on my system that I downloaded from github.com and I want to run it on my Windows machine.
I have already installed Ruby and Rails on my system, but I have no idea how to run this project. The directory of this project is something like:
C:\Users\{username}\Desktop\BitcoinFundi\BitcoinFundi
How would I run this project on my system?
To run your Ruby on Rails application, use the following command:
rails server
This will start the server and you will be able to access the application in your browser at http://localhost:3000. Port 3000 is default and you can change it in the application settings.
To run a Ruby script use:
ruby name_of_script.rb
You should check out various resources and tutorials on getting started with rails.
As you say in your comment this is your first experience with Ruby on Rails, I think you should follow through chapter 1 and 2 (at least) of Ruby on Rails Tutorial. After that you should have a better understanding of how you start up a rails app and configure the DB. You also need a bunch of other libraries and software such as mysql from the sounds of it.
You should also read Getting Started with Rails. Section 4 covers how to start the default rails server.
Here is a guide on setting up a Rails environment for Windows, which is one of many guides, that shows you some of the needed steps to get a fully working environment.

Running Webrick in Windows - Help getting started with Rails

I'm new to Ruby on Rails (and programming!) and am running through the guide here...
http://guides.rubyonrails.org/getting_started.html
However I am stumped on step 4.1. Creating a webserver as Webrick does not seem to run at all. Here is the error message that I see...
F:/Documents/Google Drive/Development/Ruby21/lib/ruby/gems/2.1.0/gems/railties-4
.2.0/lib/rails/app_rails_loader.rb:39:in `exec': No such file or directory - "F:
/Documents/Google Drive/Development/Ruby21/bin/ruby.exe" (Errno::ENOENT)
The Ruby.exe does indeed exist in this location, all previous steps have been fine up until now. Any help would be much appreciated!
Is Ruby and Rails installed locally or is it in an external flash drive or cloud storage? You might need to reinstall everything into your C:\ drive to run a local server.
Also, did you copy the command from the guide verbatim? If you're running windows and using a cmd prompt, you don't need to include the "bin/" part of that command. Simply enter "rails server" or "rails s" for short to start the server.

Cannot start project in rails

I'm pretty new to Rails.
I created a new Rails app: rails new app_name, and ran rails server etc.
But, once I shut down and reopened my machine, I can run neither rails server nor rails console. It says to use the rails new app_name command again, but I just want to restart where I left off the day before.
Any advice is very much appreciated.
I'm guessing your current working directory of your command line is not in your project directory which you created yesterday.
cd some_path/to_my/rails_project
rails server
You must be in the directory that represents your project to do things like launch the server. Otherwise, how does it know what project to launch a server for?
Just make sure you are in the directory of the rails app you created. Sounds like you aren't.

Instant rails 2.0 doesn't start the server in windows 7

I have use the instant rails. In ruby console window I have created a new ruby rails application but I can't run the file server from the script folder.
To run it i used script/server command. it says "server" is not recognized internal or external command.
I am not running windows as administration
I personally don't know what your environment looks like but it looks like instant rails isn't maintained anymore (discontinued in 2007).
That being said it might be that you're not running the script using a Ruby executable.
I would personally suggest switching to RailsInstaller or RubyStack.

Resources