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.
Related
When i am trying to execute:
bundle exec rails console
It is throwing me error as:
/gems/spring-3.1.1/lib/spring/application.rb:96:in `preload': Spring only supports Rails >= 5.2.0 (RuntimeError)
Earlier it was working fine.
Can anyone help me with a workaround for this.
The workaround I did for this was to 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 pulled someone's project from github, and we seem to be using different rails versions. When i update the rails gem, it seems to go fine, but when i check the version it still shows the previous one and won't run the rails server.
me#ubuntu:~/Documents/RailsProjects/vega$ gem install rails
--version=4.0.0
Successfully installed rails-4.0.0
Parsing documentation for rails-4.0.0
Done installing documentation for rails after 0 seconds
1 gem installed
me#ubuntu:~/Documents/RailsProjects/vega$ rails -v
Rails 3.2.6
You have multiple Rails versions installed and it's reporting the first one it finds.
Does the project have a gemfile? If so just let bundle handle this for you:
bundle install
bundle exec rails s
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
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.