5

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 3

7

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

Sign up to request clarification or add additional context in comments.

6 Comments

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:2
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.
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)
@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 :/
Sounds like you've got a problem with your Ruby or RubyGems installation. Getting those set up correctly is notoriously difficult on Ubuntu.
|
0

It looks like you're working on a ruby on rails app, so you should try running rails server in the parent of the app directory to start the application.

Comments

0

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.

http://guides.rubyonrails.org/getting_started.html

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.