I am new to the rails programming. I was building my first rails application.
In internet I was searched how to run the rails application in rails 2.3.14 version. But I did not get the answer.
I know how to start the server. But I don't know how run the rails application.
Can anyone please explain me how to run the rails application in 2.3.14 version.
You start a server in Rails 2.3 with:
./script/server start
That starts a local server in development mode, browse to http://localhost:3000 to see your application.
You might want to have a look at the other scripts in the scripts folder too, you will find a subset of modern rails commands. Like
./script/console
to open the Rails console.
But I wouldn't recommend to learn Rails with a 2.3 application. 2.3 has many differences to modern Rails 4.2 or 5.0 application.
Related
I am experiencing some weird rails behaviour:
When I do the following commands
rails new blog
rails s
rails server
The result for each is a new project, that is 3 folders names new, s, server, all with a new rails project in them
...why is this happening?? I have a feeling it may have to do with the versions I am using, I used rvm to update from 1.87 to 2.0 for Ruby and I just installed rails 2.3.14
I am using xubuntu which also just switched from Unity.
It looks like you are trying to use a Rails 3.x command with Rails 2.3. Pre 3.0 you have to use the server script.
From within your application directory run:
./script/server
Hope this helps.
I am having excellent experience in Java and eclipse, But new to Ruby on Rails, can anyone point to the best resources, or step which i can follow to start with Ruby On Rails development and enviornment setup for windows.
I think Rails Tutorial is a best place for you to start learning, setup environment and development for Ruby on Rails:
Rails Tutorial
Rails Guide and about API
Some videos Rails Cast
Book Rails 3 way
One more thing, I think many Rails developers will not build Rails application on Window.
I have been using it fine. You just have to setup the correct run config to run rails -s
I've been trying to get my Rails application to work TorqueBox and one of its requirements is to use JRuby as the Ruby language variant. I've installed JRuby 1.6.6 and the gemfile seems to bundle itself properly, but when the rails server is booted up and accessed within a browser (at localhost:3000 or 0.0.0.0:3000) then the webpage hangs...
I'm not sure if this is a problem with Rails 3.2 and the rails server does start fine (doesn't show any errors within the console) and the Rails 3.2 instance does work with Ruby 1.9.2. So I think it may be something with my gem file list or perhaps something within an initializer.
Any ideas if this is a common problem?
--- EDIT ---
I'm trying to access 0.0.0.0:3000 from WebBrick.
As far as I know torquebox 2.0 beta 3 is currently tested with jruby 1.6.5.1. Maybe try switching to that jruby version. Also make sure you're running ruby in 1.9 mode. To do that, create a torquebox.yml file in your rails config folder and put the below in it:
ruby:
version: 1.9
i've upgraded to rubymine 3.1 and now rubymine take all project as rails 3 project, but the mine are not. Does anybody of you face this problem. Ruby mine fires up this message, when i try to run application
Run configuration error: Rails 2.x launcher found instead of Rails 3.x one. You need '/script/rails'
script to launch Rails server. Please update server launcher according to Rails 3.x documentation
My final state is i can run rails 2.x app server from rubymine
Do you know how to achieve that?
I had this problem using Rails 2.3 and RubyMine 3.1 -- my solution was to look at the project settings (File -> Settings) and select Ruby SDK and Gems. Look through your attached rails gems. I had both rails 2.x and rails 3.x gems attached to my project.
I have just started to learn Ruby on Rails and in going through a tutorial I am not able to launch the rails project because of the following error.
-e:4:in `load': no such file to load -- script/server (LoadError)
from -e:4:in `<main>'
I have installed Ruby 1.9.2 and using RadRails as the IDE for creating and executing the Rails project. Any suggestions?
Most likely your tutorial refers to Rails 2 (for which given command works), while you're using Rails 3.
I'm not sure how exactly you start server in Rails 3 (edit see answer by jdl), but take my adice: find another tutorial. Otherwise, you'll have to create such questions here several times a day :)
If you just installed the latest Rails the the command has changed (as of Rails 3) to:
$ ./script/rails server
I think the best way to start a server in Rails 3 is to run this command from the root of the project:
rails server
You should have the rails executable in your path if you've installed the Rails 3 gem.