New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated schemas are stored in a full path inside the project folder #2325
Comments
This must be windows specific and the way we expand or join paths together in schema.ex. Thanks for the report! If someone on windows wants to take a look at this one, that would be very helpful! |
@chrismccord I found something that can be helpfull: The versions 1.3.0.rc.0 and 1.3.0.rc.1 works normally, it create the file in the correct path without create the full path, when I update to 1.3.0.rc.2 it is bugged Greetings |
@WolfDan is it a regular app or is it an umbrella app? |
Two addition questions:
|
@josevalim I have a post in Elixir Forum with all the info, I was working with umbrella and don't work, the same with non umbrella (this post here) The aditional questions:
|
@WolfDan I have pushed some changes to master, could you please give them a try locally? You need to clone Phoenix, go to the installer directory and then run the commands outlined here: https://github.com/phoenixframework/phoenix/tree/master/installer Let me know if you have any questions. |
@josevalim I have a problem with the "MIX_ENV=prod mix archive.build" command, it don't work on windows |
I think on windows it is |
@josevalim It's ok, but last command gives me an error:
|
Please try:
i.e. ignore the MIX_ENV=prod parts. |
Gives and error, the result it's:
|
Can you please use
And this time it should work. |
Youre right it works, but when I run any mix command I get this error:
|
That's because the previous command I suggested wrongly polluted your
environment. My bad. Can you try again from a new terminal/console window?
--
*José Valimwww.plataformatec.com.br
<http://www.plataformatec.com.br/>Founder and Director of R&D*
|
@josevalim now the mix commands works normally, but the bug persist, it create a full path of the migration inside the project folder |
Awesome, thank you for reporting! |
@josevalim I saw your post on elixir forum, so I create a VM with windows server 2016, the bug still present on it |
I can verify that this is an issue on Windows for version 1.3.0.rc2 |
This issue still seems to be a problem with Windows 7 My steps:
mix archive shows: phx_new-1.3.0-rc.2 And, as described in the original posting, there is a \Users\pcmarks\... folder under the _web folder. |
We need someone using Windows to help us figure this out. If you have questions, please let us know. :) |
I think I found the source of this issue for Windows platforms. In the Mix.Phoenix module, join_target_path() can be called with a target_file_path argument of "c:/Users/pcmarks/" This should match the first def of join_target_path() because the path is starting at the root. However, the characters "c;/" don't match and the second def is used. If I'm correct, shall I fix it? I'm not sure I can get to it today, however. Peter |
Thank you @pcmarks! That makes total sense. I think we should use Path.expand, that takes care of this automatically for us. If you prefer, I can also fix it myself. |
Unfortunately, I don't think I can get to it until early next week. So, if you don't mind doing it... Thanks! |
Environment
Expected behavior
Run the command and the files will be added on priv/repo/migrations
Actual behavior
When I run the command the migration files are in a full path inside the folder, the log when I run the command its:
The project folder result:
PD: of course when I run migration don't work tell me already up, but without tables, also I have unsinstalled and install again erlang/elixir
Greetings
The text was updated successfully, but these errors were encountered: