While creating the new app in rails by rails new projectname Iam getting this error i googled a lot but cant find the solution.
/home/aaquib/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/specification.rb
:2274:in `check_version_conflict': can't activate activesupport-
5.1.2,
already activated activesupport-5.0.5 (Gem::LoadError)
You should be able to fix this by removing your Gemfile.lock and running bundle install again. You have two conflicting versions of the same gem locked at the same time, which leads to this error.
If that alone doesn't work, try also running spring stop to start with a clean slate.
I think my problem is solved ..IAm posting the answer for others .
just add this in terminal..
gem clean
and then create a new app by rails new projectname.
Related
I just created a new Rails app and I have tried to start the app using the command 'rails server but the app is not starting.
(https://i.stack.imgur.com/eQAvz.png)
I have also tried to run gem install tzinfo-data, Run bundle update and budle install but its still not working. Based on what i saw from those who ran into similar problem, the tzinfo gem is the one that might need to be installed on its own but it didn't work for me.
I'm trying to create my first rails app. I'm on a Macbook Pro, so macOS.
I've been following this guide setting up rbenv, rails etc.
https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-macos
Then I'm following a crash course on YouTube. In the terminal I try to create a new rails app
rails new foodlog
It starts to set up in the folder I made for it, but the following happens during setup
Bundler::PermissionError: There was an error whle trying to create
'/Users/myusername/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/extensions/arm64-darwin-21/2.7.0/racc-1.6.0'.
It is likely that you need to grand executable permissions for all parent directories and write permissions for
/Users/myusername/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/extensions/arm64-darwin-21/2.7.0'
This error continues repeating the same thing with things such as "strscan".
Then after it says
In gemfile:
rails was resolved to 7.0.3.1, which depends on
actionmailbox was resolved to 7.0.3.1, which depends on
net-imp was resolved to 0.2.3, which depends on
stscan
run bundle binstubs bundler
Could not find gem 'sprockets-rails' in locally installed gems.
rails importmap:install
Could not find gem 'sprockets-rails' in locally installed gems.
Run 'bundle install' to install missing gems.
rails turbo:install stimulus:install
Could not find gem 'sprockets-rails' in locally installed gems.
Run 'bundle install' to install missing gems
I've tried looking online, coming across similar but not exact issues. For example, one solution suggested doing bundle install in this directory, versus where the guide says do it in the home directory. So I do that and get
Bundle complete! 0 gemfile dependencies, 1 gem now installed.
Still doesn't do anything. I think the main culprit is the permissions error it mentions above? This is my first time trying to really do any development on the macOS and I'm sure there's just a misunderstanding somewhere regarding permissions, so if anyone can help that would be appreciated!
It is likely that you need to grand executable permissions for all parent directories and write permissions for
/Users/myusername/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/extensions/arm64-darwin-21/2.7.0'
Your question does not mention, so I think you might have missed this suggestion. Make sure all directories have the executable permission
I have been having this problem the whole day. whenever i try to do a rake db:migrate command on rails i keep getting this error.
"error while loading the hoe gem.
Please install it by running the following:
$ [sudo] gem install hoe".
But everytime i run and update all my gems i still get the same error.
The hoe gems i have already installed is the latest version (hoe 3.15.3)
Please help.
Am running rails 5.0.0.1this is the error i keep getting
Do you have the correct version? check your Gemfile.
Use bundle install to install correct version
I kind of found a way around it. I just deleted the previous app folder, created a new one and the problem was fixed. Good thing i was just starting out.
I was trying to make a contact form using this site
I made it to mount ContactForm then ran bundle update and bundle install. Now I am unable to start the rails server. I get this error:
Error: Command not recognized
Usage: rails COMMAND [ARGS]
I have used git to checkout my last working copy of the app but I still am unable to start the rails server and have tried searching for answers online, unsuccessfully. Please help. I do not know how to continue to work on my website.
Thank you.
No need to respond. I tried first updating my Gemfile to the specific versions I know I was using before the rails server failed to respond. I had no luck there. Then I just uninstalled every gem and reinstalled them all and was able to get it up and running again. Mystery to me, but solved.
I'm a beginner to Ruby on Rails tutorials and the last thing I did was create a new app, generate scaffolding without Tests (- T flag), installed RSpec, and initiated a git repo in the folder.
That was two hours ago. I open my laptop up, try to run:
rails server
Now I'm seeing this error:
/Users/reneruiz/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/
rubygems/requirement.rb:72:in 'parse': Illformed requirement ["0.7.1."] (ArgumentError)
The full stack trace is here: http://cl.ly/4pQC
I did some Google searches and I can't seem to find anyone else with the same problem.
I don't know how or where to go from here. Would seriously appreciate some help.
Check your Gemfile for version requirements that look like "0.7.1." It looks like Bundler is trying to check for a gem with a certain version and is choking on the trailing period. If you find the version in your Gemfile, fix it and then run bundle install on the command line, and see if it'll start.
Instead of only bundle install run bundle install --full-index