I was given a ruby application to run, the problem is I have no idea how to run it. I am using ubuntu , and I installed apache, mysql, and ruby. The app has a folder "app" that contains "views,controllers,helpers,models" folders. I know that I must use "ruby name_of_app" to start the app, but I can't seem to find the file. Is there a standard location for that file?
3 Answers
You've been given a Rails application. If you've installed the correct version of the rails gem then you can just run one of the following from the project directory (the directory containing the app folder):
$ ./script/server # for Rails 2 $ rails server # for Rails 3 and visit http://localhost:3000 in your browser
6 Comments
aman
i did what you wrote down and I got this:/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require': no such file to load -- bundler (LoadError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in require' from ./script/../config/boot.rb:4 from ./script/server:2:in `require' from ./script/server:2Christian Schwartz
Your application may require some additional dependencies. One way to manage said dependencies is using the bundler gem. You can check if you're using bundler by looking for a Gemfile in the projects root directory. If a Gemfile is present, you need to install bundler (using
gem install bundler, you might need to sudodepending on your ruby installation) and running bundle install to install your dependencies.Gareth
If you're having trouble getting started then I'd approach the person who gave you the code. Rails sites aren't necessarily trivial to set up unless you have some Rails experience (and it sounds like you don't)
aman
@Christian Schwartz: Thanks for the help. I followed your steps and when i got to the "bundle install" I got this: "command not found" Weird since I just installed it :/
Emily
Sounds like you've got a problem with your Ruby or RubyGems installation. Getting those set up correctly is notoriously difficult on Ubuntu.
|
Sounds like a ruby on rails app.
Here is a link to a getting started guide. You should be able to pick your way through and run the rails app.