I am newbie on Linux Ubuntu. Before i was working on windows and many
people suggest me to work with Linux is better then windows. I installed
ubuntu 12.04 in my system but facing myriad problems because of new to
it.
I installed ruby 1.9.2 and rails 3 with RVM but when I am making a new
project by the command "$ rails new project". It's creating all the
directories but in the end showing following error.
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
I go through with documentation presented on the link and did many task
but couldn't succeed.
When I am running command in the project root.
rails server or script/server showing following error too.
My result is below when i am running bundle install in app folder
amir@ubuntu:~/project$ bundle install
Fetching gem metadata from https://rubygems.org/.Unfortunately, a fatal
error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/home/amir/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require': no such file to load -- openssl (LoadError)
from
/home/amir/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
from
/home/amir/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/https.rb:92:in
`<top (required)>'
from
/home/amir/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
from
/home/amir/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/vendor/net/http/persistent.rb:447:in
`ssl'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/vendor/net/http/persistent.rb:216:in
`connection_for'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/vendor/net/http/persistent.rb:358:in
`request'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/fetcher.rb:145:in
`fetch'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/fetcher.rb:173:in
`fetch_dependency_remote_specs'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/fetcher.rb:132:in
`fetch_remote_specs'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/fetcher.rb:70:in
`specs'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/source.rb:234:in
`block in remote_specs'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/source.rb:232:in
`each'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/source.rb:232:in
`remote_specs'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/source.rb:165:in
`fetch_specs'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/source.rb:70:in
`specs'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/definition.rb:205:in
`block (2 levels) in index'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/definition.rb:202:in
`each'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/definition.rb:202:in
`block in index'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/index.rb:9:in
`build'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/definition.rb:198:in
`index'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/definition.rb:192:in
`resolve'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/definition.rb:127:in
`specs'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/definition.rb:122:in
`resolve_remotely!'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/installer.rb:48:in
`run'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/installer.rb:12:in
`install'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/cli.rb:220:in
`install'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/vendor/thor/task.rb:22:in
`run'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/vendor/thor/invocation.rb:118:in
`invoke_task'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/vendor/thor.rb:263:in
`dispatch'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/vendor/thor/base.rb:386:in
`start'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/bin/bundle:13:in
`<top (required)>'
from /home/amir/.rvm/gems/ruby-1.9.2-p320/bin/bundle:19:in `load'
from /home/amir/.rvm/gems/ruby-1.9.2-p320/bin/bundle:19:in `<main>'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/bin/ruby_noexec_wrapper:14:in
`eval'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/bin/ruby_noexec_wrapper:14:in
`<main>'
amir@ubuntu:~/project$
# 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'
libssl-dev is required on your system.
try this:
sudo apt-get install libssl-dev
cd ~/.rvm/src/yourRubyVersion/ext/openssl
ruby extconf.rb
make && make install
Dear Leoncio Caminha
Many thanks to you. I installed the bundle but now the problem is coming
in starting of server. When i am running the server as "rails server" it
is showing following error.
amir@ubuntu:~/apps$ rails server
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in
`autodetect': Could not find a JavaScript runtime. See
GitHub - sstephenson/execjs: Run JavaScript code from Ruby for a list of available runtimes.
(ExecJS::RuntimeUnavailable)
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/execjs-1.4.0/lib/execjs.rb:5:in
`<module:ExecJS>'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/execjs-1.4.0/lib/execjs.rb:4:in
`<top (required)>'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in
`require'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in
`<top (required)>'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in
`require'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in
`<top (required)>'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in
`require'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in
`<top (required)>'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in
`require'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in
`block (2 levels) in require'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in
`each'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in
`block in require'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in
`each'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in
`require'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/bundler-1.1.4/lib/bundler.rb:119:in
`require'
from /home/amir/apps/config/application.rb:7:in `<top (required)>'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.6/lib/rails/commands.rb:53:in
`require'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.6/lib/rails/commands.rb:53:in
`block in <top (required)>'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.6/lib/rails/commands.rb:50:in
`tap'
from
/home/amir/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.6/lib/rails/commands.rb:50:in
`<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Please help me out. I am newbie can be ask stupid questions.