I am new for Ruby on rails. I have configured the rails in my system(Windows 7).
After Creating the new project in rails (localhost:3000) is working fine.
I am try to import the bootstrap in my rails project .
Kindly advise me how to resolve this case.
C:\row\dev\mybootstrap>rails g controller home index
C:\row\dev\mybootstrap>rails s
Its showing the below error.
Go to http://nodejs.org/download/ and install nodejs
Note: Don't forget to restart the machine once nodejs is installed.
what about installing node js?
get it from here https://nodejs.org/en/download
Related
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 want to create a Rail project named Pierre with Aptana Studio 3 but it's written :
Pierre#PC-Pierre ~
$ rails new .
Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first.
Type 'rails' for help.
I have joined a screenshot of the repository where I created my project. Could someone help me to deal with that ?
Seems like the issue you are describing comes from Aptana and not Rails. Create the App from cmd and then import it into Aptana like so: https://superuser.com/questions/324183/how-can-i-import-an-existing-project-in-aptana-without-moving-the-files
I just downloaded Ruby on Rails through RailsInstaller. I've seen on a tutorial that to start a new project, I had to tap rails new + the name of my new app on the terminal. But when I do that, I've got an error :
Error
The specified path was not found
Does anyone have an idea to help me ?
Thanks ;)
You need to ensure that the rails command is available in your PATH...I think the problem is not rails new, but rather the fact that your shell does not know where to find the rails command.
I've just red "Getting Started with Rails" and trying to create a blog project again from scratch.
I've created a new environment for rails projects with vagrant/virtualbox/ubuntu 12.04
Here is the problem.
I've create a new rails project with
rails new blog
Thereafter, using
bin/rails generate controller pages
I've create a controller, and continued working with project. After some time, I've decided to delete the blog project and start again from scratch.
I've started a new iteration
rails new blog | works fine
cd blog
bin/rails generate controller pages | does not create a controller, does not terminate, only with control + C
I've repeated all steps with a new project blog2. And the result was the same. If i create a new project, then delete it, then create a project with the same name
bin/rails generate
will not work.
Rubu 2.1.3/Rails 4.1.6
What should I do to fix it?
Solved by executing:
spring stop
I had a similar issue when using RVM. I had to close that terminal, opened another terminal, then switched back to that version of ruby.
After that everything worked fine again.
I created a new Rails project in a directory, say Desktop (rails new project1). After that, I ran the following command:
rails server
Then, the project1 was running on localhost.
After that, I made another directory with name (project1) in another location. I copied all the files from the previous location to new location. After that, when I ran the following command:
rails server
I got the following error message:
Rails is not currently installed on this system.
But it is working in the previous directory. How do I solve this?
If you are totally new to Rails development and System administration it is rather complicated in the beginning. I recommend any kind of Rails tutorial to you for examply by Michael Hartl .
As Graeme McLean points out you somewhen understand that there is information about your environment needed to help you.
Most likely the requirements you need to be set up are not set up in the place you did copy your rails project as Pavan and Thaha kp pointed out.