rails new my app failed - ruby-on-rails

I followed the steps on installing ruby on https://gorails.com/setup/ubuntu/14.10
I tried the command rails new app
but I keep on getting this error Help!!
/home/paulydee/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- rails/cli (LoadError)
from /home/paulydee/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:inrequire'

Is your problem the same as this one? If so, install rails by calling gem install rails

Related

Ruby failing to run after upgrading (sqlite3_native LoadError); sqlite3 not upgrading properly

I have upgraded to ruby 2.5.0 but I am having conflicts everywhere. I have checked previous posts on stack overflow such as:
Ruby on Rails - "Add 'gem sqlite3'' to your Gemfile"
cannot load such file — sqlite3/sqlite3_native
cannot load such file -- sqlite3/sqlite3_native (LoadError) on ruby on rails
https://github.com/sparklemotion/sqlite3-ruby/issues/137
But none of them are working for me. My issue is similar to these posts in that after I run rails server after a long error message the last few lines read:
1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in 'block in require'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in 'require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
I have tried creating a new project, reinstalling sqlite3 through gem and minigw itself, reinstalling rails and ruby. I have tried most of the instructions in the previous questions but nothing works. SQLite3 version 3.25.2, Ruby 2.5.3, rails 5.2.1
Sorry, this might be a simple fix but I am a complete beginner to ruby and I have been trying different things for a few hours now. Any help is appreciated.
As explained in this answer https://stackoverflow.com/a/49736971/4685144, you should now be able to install sqlite3 using git:
gem 'sqlite3', git: 'https://github.com/sparklemotion/sqlite3-ruby'
Then bundle install

cannot load such file — sqlite3/sqlite3_native (LoadError) on ruby on rails

2.5.1 Ruby, 5.2.1 Rails versions. Everything is installed from scratch. Im trying to create a project in RubyMine, and this error pops up right from the start, and i can do nothing untill this error is solved.
This solution didnt work for me:
cannot load such file -- sqlite3/sqlite3_native (LoadError) on ruby on rails
Couldnt make to the end of this solution:
An error occurred while installing sqlite3 (1.3.11), and Bundler cannot continue
on 5-th step after execution of "configure" promt says that no acceptable c compiler found in PATH.
Help please.
So it seems that there are some problems with compability on this versions of ruby, rails, and sqlite. I've installed rails installer with 2.3.3 ruby and 5.1.6 rails, and error dissapeared.

Issue With Starting Rails Server & Creating a New Rails Project

I am new to rails and have finally been able to install rails and follow along with a video tutorial. I am having a couple issues. Yesterday I was not having any major issues. Then this morning when I tried to create another rails project I get an error or when I try to run my rails server for my last first project I get an error. Any help would be greatly appreciated. Thank you!
/Users/lipmanb/.rvm/gems/ruby-2.0.0-p643/bin/rails:23:in `load': cannot load such file -- /Users/lipmanb/.rvm/gems/ruby-2.0.0-p643/gems/rails-4.2.3/bin/rails (LoadError)
from /Users/lipmanb/.rvm/gems/ruby-2.0.0-p643/bin/rails:23:in `<main>'
from /Users/lipmanb/.rvm/gems/ruby-2.0.0-p643/bin/ruby_executable_hooks:15:in `eval'
from /Users/lipmanb/.rvm/gems/ruby-2.0.0-p643/bin/ruby_executable_hooks:15:in `<main>'.
It looks like you don't have Rails installed on that environment. You may have installed Rails system wide, but since you are using RVM and you are within a Rails folder, you may be missing that specific Rails version.
Run bundler from within the Rails folder and install the required version.
$ bundler install
or simply
$ bundler
Navigate to your root directory cd ~ and type the following:
sudo gem install rails

Ruby LoadError cannot load such file

Im new in Ruby.
This is an output of terminal when i type "rails --version"
/home/juldou/.rbenv/versions/2.2.1/bin/rails:23:in load': cannot load such file -- /home/juldou/.rvm/gems/ruby-2.2.1/gems/rails-4.2.3/bin/rails (LoadError)
from /home/juldou/.rbenv/versions/2.2.1/bin/rails:23:in'
Did you install rails gem? if not, run "gem install rails" this is great resource that explains how to install ruby, rails and database.
https://gorails.com/setup/ubuntu/15.04

Error with Rails Edge/4 `require': cannot load such file -- thread_safe

Following ths instructions here for getting an app running off Rails Edge to test Rails 4:
What is the best way to generate a Rails app using edge?
and
How to create Edge rails application?
But running into this error:
`require': cannot load such file -- thread_safe (LoadError)
Using the command:
rails new Edge --edge --skip-bundle --database=postgresql --skip-test-unit --skip-index-html
A checkout of Rails master bin dir is on my path.
I am using rbenv with ruby 1.9.3p327.
I have cleared all my installed gems out, just running bundler.
Rails 3.2.9 works fine on my system, have an app in active development.
Issue is not having the rails gems installed (when installing via rubygems, dependencies are automatically resolved.
See https://github.com/rails/rails/pull/8589
Need to go into the cloned rails dir and run "bundle install", which will pull in the necessary gems.

Resources