Newb Rails question on upgrading existing project

So I’m super new, just did 9 hour course on linkedIn just to get the basics. Why you ask. I’ll tell you. trying to develop app for friend to Clio, to demonstrate how theirs works they provided sample project that is ruby, so I figured well if they have some of it already written in Ruby, sure I’ll try it. So did the crash course and now I’m trying to get their base project into my rails env to play with it… its not going well. I imported it into my local repo that is Ubuntu 24. I went to my terminal and typed rails c thinking it would start up… nope… told me ruby-3.1.6 was end of life and that rails was not even on here… so I tried doing all my normal install commands like I did with my test projects for the class but still never works… I always get this long error

“Could not find rails-7.0.8.4, puma-6.4.2, sass-rails-5.1.0, uglifier-4.2.0, coffee-rails-4.2.2, rubocop-rails-2.15.0, jquery-rails-4.6.0, turbolinks-5.2.1, jbuilder-2.12.0, http-5.2.0, jwt-2.5.0, secure_headers-6.3.1, byebug-11.1.3, dotenv-rails-2.8.1, web-console-4.2.1, listen-3.9.0, spring-4.2.1, spring-watcher-listen-2.1.0, pry-0.14.2, pry-byebug-3.8.0, actioncable-7.0.8.4, actionmailbox-7.0.8.4, actionmailer-7.0.8.4, actionpack-7.0.8.4, actiontext-7.0.8.4, actionview-7.0.8.4, activejob-7.0.8.4, activemodel-7.0.8.4, activerecord-7.0.8.4, activestorage-7.0.8.4, activesupport-7.0.8.4, railties-7.0.8.4, nio4r-2.7.3, sass-3.7.4, sprockets-3.7.3, sprockets-rails-3.4.2, tilt-2.3.0, execjs-2.9.1, coffee-script-2.4.1, rack-2.2.9, rubocop-1.50.2, rails-dom-testing-2.2.0, turbolinks-source-5.2.0, addressable-2.8.6, base64-0.2.0, http-cookie-1.0.6, http-form_data-2.3.0, llhttp-ffi-0.5.0, dotenv-2.8.1, bindex-0.8.1, rb-fsevent-0.11.2, rb-inotify-0.11.1, coderay-1.1.3, method_source-1.1.0, websocket-driver-0.7.6, mail-2.8.1, net-imap-0.4.14, net-smtp-0.5.0, rack-test-2.1.0, rails-html-sanitizer-1.5.0, globalid-1.2.1, nokogiri-1.13.10, builder-3.3.0, erubi-1.13.0, marcel-1.0.4, mini_mime-1.1.5, concurrent-ruby-1.3.3, i18n-1.14.5, minitest-5.23.1, rake-13.2.1, zeitwerk-2.6.15, sass-listen-4.0.0, coffee-script-source-1.12.2, json-2.7.2, parallel-1.24.0, parser-3.3.3.0, rainbow-3.1.1, regexp_parser-2.9.2, rexml-3.3.0, rubocop-ast-1.30.0, ruby-progressbar-1.13.0, unicode-display_width-2.5.0, public_suffix-5.1.1, domain_name-0.6.20240107, ffi-compiler-1.3.2, ffi-1.17.0, websocket-extensions-0.1.5, date-3.3.4, net-protocol-0.2.2, mini_portile2-2.8.7, racc-1.8.0, ast-2.4.2, strscan-3.1.0, timeout-0.4.1, crass-1.0.6 in locally installed gems”

I assume these are all gems used in the sample program that need to be installed ? Again I’m very new to ruby and rails and just trying to this figured out. I had one idea to just make new project and paste in the code they have but not sure how well that will work out…

Here is the link to the repo online for the sample code if that helps out with giving me some pointers…

this could also be a “I’m not so great at github” issue also…

Thanks for any pointers.

Try running the command bundle install in the top directory of your Rails app.

Thanks for the reply

I did try that, I was hoping all the install and update commands would fix whatever was behind in version but it didnt…

kevin@UBER-PC:~/ClioTest/ClioTest$ bundle install Bundler 2.3.27 is running, but your lockfile was generated with 2.4.20. Installing Bundler 2.4.20 and restarting using that version. Fetching gem metadata from https://rubygems.org/. … here is everything I attempted to run

  • 68 rails c
  • 69 sudo apt install ruby-railties
  • 70 rails c
  • 71 bundle install
  • 72 rails c
  • 73 sudo apt update
  • 74 sudo apt upgrade
  • 75 rails c
  • 76 rails --version
  • 77 curl https://mise.run | sh
  • 78 source ~/.bashrc
  • 79 mise use -g ruby@3

I’ll try more if you point the way.

Does that mean you’re still getting that long list of “can’t find” gems? Or are the error messages different now?

Another (small) thing to check: be sure you’re executing the rails command from your project’s bin directory.

so that orig error is from when I had already done the bundle. I did just now try to run rails from the bin and I got error about javascript… so I did an install or nodejs… now when I run rails c, I get

kevin@UBER-PC:~/ClioTest/ClioTest$ rails c Running via Spring preloader in process 24668 Loading development environment (Rails 7.0.8.4) irb(main):001:0>

is that normal ? I would assume it would start the webpage, or it could just be misunderstanding of what sample project I have in here.

Yes, that’s a normal command prompt from the Rails console. The console is very useful for testing and maintenance tasks such as executing bits of code and querying the database using the Active Record Query Interface. But it doesn’t act as a web server.

To spin up a web server, type bin/rails s from the top directory of your Rails app. Then your browser should be able to navigate to http://localhost:3000 and view the web app screens.

ahh you are correct… getting my Rails commands confused. rails s does bring up the server… duh… still getting used to the commands… Thanks. lets see how far I can get from here.

1 Like