I am trying to run https://github.com/netguru/people but keep getting issues. When I push it to heroku i get errors, when I copied the files to my projects folder and run 'rails server' I get rails server
Your Ruby version is 2.1.1, but your Gemfile specified 2.0.0
I updated the ruby version in gem file but still run into issues.
Any help would be appreciated. Running Mac OSX Mavericks
I believe you've got your answer here https://github.com/netguru/people/issues/3
try to do:
gem install bundler rails
and then just do
bundle
Related
rbenv ruby version: 2.6.6
rails version: 5.1.4
I am working within an older codebase (ruby: 2.6.6 | rails: 5.4.1). This is a codebase I work with daily. I had to download a new ruby version, through rbenv, for a separate repo and in doing so caused quite an issue in my dev environment for the older codebase.
My initial investigation of the issue that popped up led me to delete the rbenv ruby version I had for the older code base (2.6.6), re-install the ruby version, rehash then reinstall bundler.
Previously, I could just run rails command (rails c, rails s) to open the console or run the server. Now I am met with this error when trying to run a rails command:
rbenv: rails: command not found
The `rails' command exists in these Ruby versions:
2.3.1
When trying to open the rails console with the following commands, bundle exec rails console, bin/rails console, I am met with this error:
`preload': Spring only supports Rails >= 5.2.0 (RuntimeError)
After running bin/rails s, and opening the webpage, the console returns a 500 error:
Completed 500 Internal Server Error in 427ms (ActiveRecord: 0.9ms)
Error during failsafe response: couldn't find file 'ckeditor/init' with type 'application/javascript'
This isn't the exact answer to your question, but the workaround I did for the "Spring only supports Rails >= 5.2.0" was to just create a new project with rails 5.2.3 or something.
If you want to do the same, you can first list all your local gems by doing gem list rails --local
You will see all your rails versions installed locally.
Then do gem install rails -v '5.2.3'
Now go to a new project directory and run rails _5.2.3_ new appname
Now, you should be able to use the console, generate, migrate and other commands.
You can do bundle install after adding other relevant gems based on your apps requirement.
I am trying to run an old rails app, but I am receiving this error after calling $ rails server:
uninitialized constant AppGenerator::Config
Did you mean? RbConfig
I am brand new to Rails, and I really don't know what this means/where to start. The app is supposedly built on 2.3.8. My computer says I have 2.4.1 and 2.3.18 installed.
I would like to know if I should install 2.3.8, or if I should upgrade to the latest version? Also I don't understand the error that is coming up, where should I look in the app to fix this - or is this a Rails problem?
Verify the version your project is built type bundle show inside it. It's gonna show all the gems and your respective versions.
And to check the rails version just type rails -v in your terminal.
The gemfile in the app folder should tell you what version of rails it is.
You can use bundle update to update the version or if you have a newer version and want an older version, do gem uninstall rails and then gem install rails -v "version number" for example, gem install rails -v 2.3.8.
You can check the rails version on Gemfile.
Try the command rake about to see the application environment.
I would suggest to have your environment setup same on the Gemfile, your application might have compatibility issues if you use a lower version.
I'm following Michael Hartl's Ruby on Rails tutorial, and I got stuck at trying to start rails server on my Windows 7 machine.
I'm trying to do this by following instructions in Chapter 1.2.5., i.e. by typing
rails server
However, instead of booting WEBrick, this returns the instructions for usage of 'rails' command. I've been googling this for a while, and some of the answers seem to have implied that something is wrong with the rails gem.
Now, I've found the rails gem folder ("C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\rails-3.2.3"), and it's empty!
Also when I try
rails -v
it returns "Rails 3.2.16", although I've removed this version of the gem; if I try
gem list
it kept telling me that the version is 3.2.3.
This persisted until I deleted railties version 3.2.16, which resulted in
rails -v
returning 'Rails 3.2.3', but I still can't boot WEBrick.
Any help would be appreciated.
Did you run the installer?
At the time of this writing, I recommend using the Ruby 2.0.0-p353.
http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p353.exe?direct
Save yourself some future gem headaches and install the DevKit too.
http://rubyinstaller.org/downloads/
It should create a folder at C:\Ruby200. Start a new command prompt for the new paths to take affect.
Once Ruby is install, gem install Rails. From your other post, I recommend gem install rails -v 3.2.16
Then execute rails new project_name, then cd project_name. Then run rake db:migrate to create the initial database. At this point, you should be able to run rails server and visit localhost:3000 in your browser.
OK, I've managed to solve my problem.
I've seen a few more people having the same issue, but none of the solutions that I've found helped me, so here's what did it for me, though I'm not 100% sure what exactly was that one thing that actually did it...
I've followed the advice #scarver2 gave in response to my other question, and uninstalled both Rails and Railties gems from my crispy fresh installation of Ruby 1.9.3. (I've installed it using RailsInstaller). Then I've installed Rails 3.2.16 gem by typing
gem install rails -v 3.2.16
and this also installed the corresponding Railties 3.2.16 gem without my intervention.
Then I followed steps from chapters 1.2.3. and 1.2.5. of the tutorial, but making sure that line referencing ruby version in my Gemfile actually corresponds to the version of Ruby that I have installed.
I typed
ruby -v
in the console, to make sure that I have version 1.9.3. indeed. Confirming this, I've edited the Gemfile in my app so it says
ruby '1.9.3'
instead of ruby '2.0.0' line that's used in Listing 1.5. of the tutorial.
After that I've simply went to my app folder, and typed
bundle update
bundle install
in the console, and this time it did not return any errors as it did in my previous attempts. After that, typing
rails server
did what it should have, and my WEBrick server booted, allowing me to access my app on localhost. Yay!
Now, what I think may have gone wrong the last time was either me screwing up the Gemfile, so the gem versions and their dependencies got messed up. I also assume that ineptly trying to fix this by installing and uninstalling different versions of various gems did not quite help. What may have helped was uninstalling Rails and Railties gems, and installing Rails gem again.
I am new to cloudfoundry and rails, I am trying to deploy a new application to cloudfoundry, and I got this error:
====> /logs/migration.log <====
←[31mYou have requested:
mysql2 ~> 0.3.11
The bundle currently has mysql2 locked at 0.3.11.
Try running `bundle update mysql2`←[0m
I downloaded a few rails samples from here:
https://github.com/cloudfoundry-samples
with the same results.
I already tried 'bundle update mysql2'
If I push a simple ruby app that requires the gem mysql2 it works fine.
I am using windows 7 x64.
Any ideas?
Thanks.
There is an issue with deploying ruby apps bundled on Windows to CloudFoundry.com (which is Linux-based). The workaround is to modify your Gemfile.lock and delete occurrences of the string -x86-mingw32. Then re-push the app to Cloud Foundry.
can you confirm that you have run;
bundle update
bundle package
before using VMC to push the application.
The issue is when I try to start server with rails server command after successfully created Rails app by running rails new myapp -d=mysql. However, I cant get the server to start and it gives me the following error:
Could not find gem 'mysql2 (~> 0.2.6, runtime)' in any of the gem sources listed in your Gemfile. Run `bundle install` to install missing gems.
Then I run bundle install but could not happen.
I have installed:
Ruby 1.8.7
Rails 3.0.9 with mysql
RubyGems 1.8.7
I searched everywhere but nobody can solve my problem please help me with this issue as soon as possible. I am using Ubuntu 11.04.
Thanks in advance.
If your bundle install is saying everything is installed, try prefixing your rails command with
bundle exec rails server <other args here>
That will make sure you run the server in the context of the bundle (as defined by your Gemfile). If that fixes the problem for you, then you can either keep running the server using that command, or figure out what's wrong with your environment (might be a path issue, or you might have multiple versions of ruby or bundler installed and things aren't getting installed where you think they are)
i have reinstalled rails 4.2.4 using "gem install rails" command
and generated new project using rails new helloworld
"cd helloworld" and "rails server" would started my server.