nadia
nadia

Reputation: 2539

Rails server error - railties

After finishing the official getting started guide for RoR I played with it so much that I ruined the blog so I decided just to scrap everything and start again. Now that I'm trying to run the rails server I get this error

 /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor/actions.rb:109:in `expand_path': No such file or directory - getcwd (Errno::ENOENT)
    from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor/actions.rb:109:in `destination_root='
    from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor/actions.rb:85:in `initialize'
    from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/cli.rb:17:in `initialize'
    from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor.rb:359:in `new'
    from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor.rb:359:in `dispatch'
    from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor/base.rb:440:in `start'
    from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/cli.rb:10:in `start'
    from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/bin/bundle:20:in `block in <top (required)>'
    from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
    from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/bin/bundle:20:in `<top (required)>'
    from /home/nadia/.gem/ruby/2.0.0/bin/bundle:23:in `load'
    from /home/nadia/.gem/ruby/2.0.0/bin/bundle:23:in `<main>'

in the gemfile I have added

   gem 'railties', '~>4.0.2'

then

$ bundle install

to try and resolve the issue. However it still hasn't work. I'm fairly new so I'm not actually sure what the error is. Any thoughts would be appreciated. I'm also running rails v4.0.2 if that helps

Upvotes: 0

Views: 631

Answers (3)

nadia
nadia

Reputation: 2539

Whoops. I derped. All sorted now. I was simply trying to run it from the wrong directory. Should have seen it earlier.

Upvotes: 0

Bharat soni
Bharat soni

Reputation: 2786

Define rails in gem file like this

gem 'rails', '4.0.2'

And then bundle install.

Upvotes: 0

Nick Veys
Nick Veys

Reputation: 23939

This is a pretty weird thing to see:

No such file or directory - getcwd (Errno::ENOENT)

Are you trying to run this application from a directory you maybe moved, or even deleted? That error implies that it can't determine the current directory.

Upvotes: 1

Related Questions