I did a fresh install of Ubuntu 12.04 yesterday and am working with Ruby/Rails for the first time in this environment, and copied the project directly from my Windows machine. I installed rubygems, then cd
'd to the project directory and ran bundle install
, which worked without any errors.
When trying to start the server though (rails s
) , the server never starts and I get an exception:
/usr/lib/ruby/vendor_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find railties (>= 0) amongst [] (Gem::LoadError)
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/dependency.rb:256:in
to_spec'
gem'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems.rb:1208:in
from /usr/local/bin/rails:18
My Gemfile is as folows:
source 'http://rubygems.org'
gem 'rails', '3.2.6'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'execjs'
gem 'therubyracer'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem 'devise'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
Everything is for the most part what the generator left it as. Thank you.
bundle exec rails s
– utwang:key
. Not too sure why it works fine on my Windows machine. – Lander...sion_store :cookie_store, key: '_threexortwo_session'
. 'key: xxx' is hash in Ruby 1.9. But, in the log, I can see keyword of '1.8'. Which version do you use in both environment? – utwangrails -v
I get the same error as in the question. I reinstalled 1.9.3 with RVM, reset the alias, checked withrails -v
(worked), then ransudo gem install bundler
andsudo bundle install
again. After this, I tried rerunning the server, and it failed again. Rainrails -v
and I get the error again. – Landerrails -v
at two directory? And trywhich rails
at two directory. 1)Rails Application Root 2)Out of Rails Application (ex $home). – utwang